Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932666AbaJVU5a (ORCPT ); Wed, 22 Oct 2014 16:57:30 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47530 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932111AbaJVU52 (ORCPT ); Wed, 22 Oct 2014 16:57:28 -0400 Date: Wed, 22 Oct 2014 22:57:25 +0200 (CEST) From: Jiri Kosina To: "Paul E. McKenney" cc: Peter Zijlstra , Ingo Molnar , "Rafael J. Wysocki" , Pavel Machek , Steven Rostedt , Dave Jones , Daniel Lezcano , Nicolas Pitre , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: lockdep splat in CPU hotplug In-Reply-To: <20141022185712.GA9570@linux.vnet.ibm.com> Message-ID: References: <20141022143837.GW4977@linux.vnet.ibm.com> <20141022165433.GA22874@linux.vnet.ibm.com> <20141022185712.GA9570@linux.vnet.ibm.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 22 Oct 2014, Paul E. McKenney wrote: > rcu: More on deadlock between CPU hotplug and expedited grace periods > > Commit dd56af42bd82 (rcu: Eliminate deadlock between CPU hotplug and > expedited grace periods) was incomplete. Although it did eliminate > deadlocks involving synchronize_sched_expedited()'s acquisition of > cpu_hotplug.lock via get_online_cpus(), it did nothing about the similar > deadlock involving acquisition of this same lock via put_online_cpus(). > This deadlock became apparent with testing involving hibernation. > > This commit therefore changes put_online_cpus() acquisition of this lock > to be conditional, and increments a new cpu_hotplug.puts_pending field > in case of acquisition failure. Then cpu_hotplug_begin() checks for this > new field being non-zero, and applies any changes to cpu_hotplug.refcount. > Yes, this works. FWIW, please feel free to add Reported-and-tested-by: Jiri Kosina once merging it. Why lockdep produced such an incomplete stacktrace still remains unexplained. Thanks, -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/