Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266587AbUAWSbN (ORCPT ); Fri, 23 Jan 2004 13:31:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266631AbUAWSbN (ORCPT ); Fri, 23 Jan 2004 13:31:13 -0500 Received: from mail.kroah.org ([65.200.24.183]:10927 "EHLO perch.kroah.org") by vger.kernel.org with ESMTP id S266587AbUAWSbJ (ORCPT ); Fri, 23 Jan 2004 13:31:09 -0500 Date: Fri, 23 Jan 2004 10:31:09 -0800 From: Greg KH To: Linus Torvalds Cc: Alan Stern , Patrick Mochel , Kernel development list Subject: Re: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core Message-ID: <20040123183109.GG23169@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 Content-Length: 1068 Lines: 29 On Fri, Jan 23, 2004 at 10:15:36AM -0800, Linus Torvalds wrote: > > What is it with USB that makes people think so? Remember all the USB bugs > early on that were due to _exactly_ that thinking. Oh yeah, I remember :( > It's wrong. YOU SHOULD NEVER WAIT FOR THE REFERNCE COUNT TO DROP TO ZERO! > > You just ignore it. With proper memory management it doesn't matter. > > For module unload, it's likely better to return an error than to wait. > Tell the super-user that you're busy. That patch that Alan pointed to is wrong anyway, it dies a horrible death, and was only a hack to try something. I think it might be a better idea to just prevent the module unload of the USB host controller until all drivers bound to devices owned by it are also unbound in order to fix these kinds of problems. 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/