Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750928Ab0ACFiQ (ORCPT ); Sun, 3 Jan 2010 00:38:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750839Ab0ACFiP (ORCPT ); Sun, 3 Jan 2010 00:38:15 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:35875 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750782Ab0ACFiO (ORCPT ); Sun, 3 Jan 2010 00:38:14 -0500 To: Tejun Heo Cc: Linus Torvalds , KOSAKI Motohiro , Borislav Petkov , David Airlie , Linux Kernel Mailing List , Greg KH , Al Viro , Dmitry Torokhov Subject: Re: drm_vm.c:drm_mmap: possible circular locking dependency detected References: <20091226094504.GA6214@liondog.tnic> <20091228092712.AA8C.A69D9226@jp.fujitsu.com> <4B3EB687.7000005@kernel.org> <4B3FE586.7020109@kernel.org> <4B4024A5.1020704@kernel.org> From: ebiederm@xmission.com (Eric W. Biederman) Date: Sat, 02 Jan 2010 21:38:05 -0800 In-Reply-To: <4B4024A5.1020704@kernel.org> (Tejun Heo's message of "Sun\, 03 Jan 2010 14\:01\:25 +0900") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-XM-SPF: eid=;;;mid=;;;hst=in01.mta.xmission.com;;;ip=76.21.114.89;;;frm=ebiederm@xmission.com;;;spf=neutral X-SA-Exim-Connect-IP: 76.21.114.89 X-SA-Exim-Mail-From: ebiederm@xmission.com X-SA-Exim-Scanned: No (on in01.mta.xmission.com); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 27 Tejun Heo writes: > It's interesting that the above cases arn't common drivers. AFAICS, > the problem cases would usually be cases like above where the user is > a rather complex software entity or drivers which implement some form > of self detaching via sysfs. For the former group, I agree that > splitting deleting and draining (or simply skipping the draining part > or active reference counting both of which basically achieve the same > thing) would be an easy way out as it would be generally easy to leave > the data structures dangling till the references go away. > > How about simply introducing an interface to mark sysfs nodes which > don't require active reference counting and using them on those nodes? That might work. However it does not seem to address the case of bond_sysfs, especially with someone doing rmmod bonding. I think the brainstorm is on the right track. I think we just need to look at a few more cases in depth so that we can see a pattern and generalize what can be done. Eric -- 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/