Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266596AbUAWS1N (ORCPT ); Fri, 23 Jan 2004 13:27:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266630AbUAWS1N (ORCPT ); Fri, 23 Jan 2004 13:27:13 -0500 Received: from mail.kroah.org ([65.200.24.183]:57261 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S266596AbUAWS1M (ORCPT ); Fri, 23 Jan 2004 13:27:12 -0500 Date: Fri, 23 Jan 2004 10:27:14 -0800 From: Greg KH To: Linus Torvalds Cc: Alan Stern , Kernel development list , Patrick Mochel Subject: Re: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core Message-ID: <20040123182714.GF23169@kroah.com> References: <20040123181106.GD23169@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1172 Lines: 34 On Fri, Jan 23, 2004 at 10:19:15AM -0800, Linus Torvalds wrote: > > > On Fri, 23 Jan 2004, Greg KH wrote: > > > > > > So why would this not deadlock? > > > > It will deadlock if the user does something braindead like: > > rmmod foo < /sys/class/foo_class/foo1/file > > I don't much worry about things like that, since only root can rmmod > anyway. Yeah, that's why I didn't care very much either. > HOWEVER - I do worry when people start exporting interfaces that are > basically _designed_ to deadlock. It's a bad interface. Don't export it. > There is possibly just _one_ place that can do it, and it's the module > unload part. Everything else would be a bug. > > So do it in the one place. Don't make a function that does it and that > others will start using because it's "simple". Ok, fair enough. I'll make up a patch to remove that other "unregister_wait" function in the driver core. thanks, greg k-h - 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/