From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266614AbUAWSLz (ORCPT ); Fri, 23 Jan 2004 13:11:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266620AbUAWSLw (ORCPT ); Fri, 23 Jan 2004 13:11:52 -0500 Received: from mail.kroah.org ([65.200.24.183]:26792 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S266614AbUAWSLK (ORCPT ); Fri, 23 Jan 2004 13:11:10 -0500 Date: Fri, 23 Jan 2004 10:11:06 -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: <20040123181106.GD23169@kroah.com> References: 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 On Fri, Jan 23, 2004 at 09:42:09AM -0800, Linus Torvalds wrote: > > > On Fri, 23 Jan 2004, Alan Stern wrote: > > > > Since I haven't seen any progress towards implementing the > > class_device_unregister_wait() and platform_device_unregister_wait() > > functions, here is my attempt. > > So why would this not deadlock? It will deadlock if the user does something braindead like: rmmod foo < /sys/class/foo_class/foo1/file Now I know the network code can handle something like that, but they have their own thread to handle issues like this... It's not sane to make every driver subsystem do that... So in short, it's used to make sure that all references are dropped, before allowing the module to be unloaded. And Alan, I think Pat already has this in his tree, if only he would send that to Linus one of these days... thanks, greg k-h