Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752649Ab0ACLOY (ORCPT ); Sun, 3 Jan 2010 06:14:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752624Ab0ACLOX (ORCPT ); Sun, 3 Jan 2010 06:14:23 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:46565 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752528Ab0ACLOW (ORCPT ); Sun, 3 Jan 2010 06:14:22 -0500 To: Dmitry Torokhov Cc: Tejun Heo , Linus Torvalds , KOSAKI Motohiro , Borislav Petkov , David Airlie , Linux Kernel Mailing List , Greg KH , Al Viro Subject: Re: drm_vm.c:drm_mmap: possible circular locking dependency detected References: <20091228092712.AA8C.A69D9226@jp.fujitsu.com> <4B3EB687.7000005@kernel.org> <4B3FE586.7020109@kernel.org> <20100103074745.GA2314@core.coreip.homeip.net> From: ebiederm@xmission.com (Eric W. Biederman) Date: Sun, 03 Jan 2010 03:14:18 -0800 In-Reply-To: (Eric W. Biederman's message of "Sun\, 03 Jan 2010 02\:57\:15 -0800") 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=in02.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 in02.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: 932 Lines: 28 ebiederm@xmission.com (Eric W. Biederman) writes: > What to do about it is another question. It has just recently come to my > attention that we have more events like this In the specific case of serio what gets us in trouble is the call to sysfs_remove_group. If instead of independent calls to sysfs_create_group/sysfs_remove_group, you could move the groups into a list on dev->groups than we could solve two problems. - Userspace would see all of the attributes when the hotplug event is fired remove races. - We would not hold serio->drv_mutex over sysfs_remove_group so there would not be a possible deadlock on device removal. Does that change sound possible? 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/