From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbaBNSa7 (ORCPT ); Fri, 14 Feb 2014 13:30:59 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:35146 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751525AbaBNSa5 (ORCPT ); Fri, 14 Feb 2014 13:30:57 -0500 Date: Fri, 14 Feb 2014 13:30:49 -0500 (EST) Message-Id: <20140214.133049.832801765872021685.davem@davemloft.net> To: srivatsa.bhat@linux.vnet.ibm.com Cc: paulus@samba.org, oleg@redhat.com, mingo@kernel.org, rusty@rustcorp.com.au, peterz@infradead.org, tglx@linutronix.de, akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com, tj@kernel.org, walken@google.com, ego@linux.vnet.ibm.com, linux@arm.linux.org.uk, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v2 13/52] sparc, sysfs: Fix CPU hotplug callback registration From: David Miller In-Reply-To: <20140214075204.22701.72009.stgit@srivatsabhat.in.ibm.com> References: <20140214074750.22701.47330.stgit@srivatsabhat.in.ibm.com> <20140214075204.22701.72009.stgit@srivatsabhat.in.ibm.com> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Fri, 14 Feb 2014 10:30:56 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Srivatsa S. Bhat" Date: Fri, 14 Feb 2014 13:22:05 +0530 > Subsystems that want to register CPU hotplug callbacks, as well as perform > initialization for the CPUs that are already online, often do it as shown > below: ... > This is wrong, since it is prone to ABBA deadlocks involving the > cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently > with CPU hotplug operations). > > Instead, the correct and race-free way of performing the callback > registration is: ... > Fix the sysfs code in sparc by using this latter form of callback > registration. > > Cc: "David S. Miller" > Cc: Ingo Molnar > Cc: sparclinux@vger.kernel.org > Signed-off-by: Srivatsa S. Bhat Acked-by: David S. Miller From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Date: Fri, 14 Feb 2014 18:30:49 +0000 Subject: Re: [PATCH v2 13/52] sparc, sysfs: Fix CPU hotplug callback registration Message-Id: <20140214.133049.832801765872021685.davem@davemloft.net> List-Id: References: <20140214074750.22701.47330.stgit@srivatsabhat.in.ibm.com> <20140214075204.22701.72009.stgit@srivatsabhat.in.ibm.com> In-Reply-To: <20140214075204.22701.72009.stgit@srivatsabhat.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: srivatsa.bhat@linux.vnet.ibm.com Cc: paulus@samba.org, oleg@redhat.com, mingo@kernel.org, rusty@rustcorp.com.au, peterz@infradead.org, tglx@linutronix.de, akpm@linux-foundation.org, paulmck@linux.vnet.ibm.com, tj@kernel.org, walken@google.com, ego@linux.vnet.ibm.com, linux@arm.linux.org.uk, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, sparclinux@vger.kernel.org From: "Srivatsa S. Bhat" Date: Fri, 14 Feb 2014 13:22:05 +0530 > Subsystems that want to register CPU hotplug callbacks, as well as perform > initialization for the CPUs that are already online, often do it as shown > below: ... > This is wrong, since it is prone to ABBA deadlocks involving the > cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently > with CPU hotplug operations). > > Instead, the correct and race-free way of performing the callback > registration is: ... > Fix the sysfs code in sparc by using this latter form of callback > registration. > > Cc: "David S. Miller" > Cc: Ingo Molnar > Cc: sparclinux@vger.kernel.org > Signed-off-by: Srivatsa S. Bhat Acked-by: David S. Miller