Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757035AbZDFSmh (ORCPT ); Mon, 6 Apr 2009 14:42:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752246AbZDFSm3 (ORCPT ); Mon, 6 Apr 2009 14:42:29 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:54547 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752508AbZDFSm2 (ORCPT ); Mon, 6 Apr 2009 14:42:28 -0400 Date: Mon, 6 Apr 2009 14:42:26 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Gautham R Shenoy cc: "Rafael J. Wysocki" , Peter Zijlstra , Rusty Russell , Linux Kernel List , Linux-pm mailing list , Ingo Molnar , Andrew Morton Subject: Re: [linux-pm] pm-hibernate : possible circular locking dependency detected In-Reply-To: <20090406152038.GB17559@in.ibm.com> Message-ID: 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 Content-Length: 1175 Lines: 29 On Mon, 6 Apr 2009, Gautham R Shenoy wrote: > > If I understand correctly it isn't really a deadlock scenario, but it > > is a lockdep violation. The violation is: > > > > The pci_device_probe() path 2) proves that dpm_list_mtx [4] can > > be acquired while cpu_hotplug.lock [3] is held; > > > > The hibernate() path 3) proves that cpu_hotplug.lock [3] can be > > acquired while dpm_list_mtx [4] is held. > > > > The two pathways cannot run simultaneously (and hence cannot deadlock) > > because the prepare() stage of hibernation is supposed to stop all > > device probing. But lockdep will still report a problem. > > Thanks for clarifying this Alan. I guess it boils down to teaching > lockdep about this false-positive. Or else changing the code somehow to avoid the violation completely. But I have no idea how... And AFAIK, teaching lockdep about special cases like this is not so easy to do. Alan Stern -- 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/