Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756233AbYARHyT (ORCPT ); Fri, 18 Jan 2008 02:54:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752902AbYARHyK (ORCPT ); Fri, 18 Jan 2008 02:54:10 -0500 Received: from fg-out-1718.google.com ([72.14.220.155]:53792 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752186AbYARHyH (ORCPT ); Fri, 18 Jan 2008 02:54:07 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=rx23oghZ21ZsDFurdeRxoOn4Pz52IzeDRvuN8FJOs3OWZ/dH10E6DD5BkumwE9+wGFcKOjC9OEcTEAGFDpJm+aPLMe7jbIhSpvFB5zowPpUeOEo9EjXbv99PWgICWr6K712cMBoOmwKzYGhl27EKvdvbPAjuzigbq0Pus8wnft8= Date: Fri, 18 Jan 2008 09:00:34 +0100 From: Jarek Poplawski To: Dave Young Cc: Alan Stern , Greg KH , stefanr@s5r6.in-berlin.de, David Brownell , Kernel development list Subject: Re: [PATCH 7/7] driver-core : convert semaphore to mutex in struct class Message-ID: <20080118080034.GB1703@ff.dom.local> References: <20080117194728.GA2598@ami.dom.local> <20080117203155.GA2791@ami.dom.local> <20080117232626.GC2905@ami.dom.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 23 On Fri, Jan 18, 2008 at 09:42:25AM +0800, Dave Young wrote: ... > After digging the class usage code again, I found that the only > possible double lock place is the class_interface_register/unregister > in which the class_device api could be called. OK, but currently after using mostly: mutex_lock(&parent_class) and once: mutex_lock_nested(&parent_class, SINGLE_DEPTH_NESTING) lockdep mostly thinks these parent classes are 2 different objects, with only 2 possible levels of nesting, so this parent_class has to have wrong name (2 parents can't be locked from the same thread, so maybe it's class_grandparent sometimes?). Jarek P. -- 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/