From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: [PATCH RFC -rt] Alleged fix for CPU-hotplug deadlock Date: Tue, 21 Feb 2012 12:00:09 -0800 Message-ID: <20120221200009.GA14368@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org To: rostedt@goodmis.org Return-path: Received: from e36.co.us.ibm.com ([32.97.110.154]:56031 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756120Ab2BUUAf (ORCPT ); Tue, 21 Feb 2012 15:00:35 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Feb 2012 13:00:31 -0700 Content-Disposition: inline Sender: linux-rt-users-owner@vger.kernel.org List-ID: This patch is intended to fix a deadlock seen in -rt. Untested, might not even compile. The intent is to move kthread_stop() outside of the CPU-hotplug lock, thus preventing deadlocks involving sleeping spinlocks. Signed-off-by: Paul E. McKenney diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 8c26a49..e0d514b 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@ -2041,8 +2041,7 @@ static int __cpuinit rcu_cpu_notify(struct notifier_block *self, rcu_send_cbs_to_online(&rcu_sched_state); rcu_preempt_send_cbs_to_online(); break; - case CPU_DEAD: - case CPU_DEAD_FROZEN: + case CPU_POST_DEAD: case CPU_UP_CANCELED: case CPU_UP_CANCELED_FROZEN: rcu_offline_cpu(cpu);