Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762287AbXKPUl7 (ORCPT ); Fri, 16 Nov 2007 15:41:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752465AbXKPUlv (ORCPT ); Fri, 16 Nov 2007 15:41:51 -0500 Received: from pentafluge.infradead.org ([213.146.154.40]:35988 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752891AbXKPUlu (ORCPT ); Fri, 16 Nov 2007 15:41:50 -0500 Date: Fri, 16 Nov 2007 12:37:48 -0800 From: Greg KH To: Alan Stern Cc: David Woodhouse , USB development list , Kernel development list Subject: Re: [PATCH] Driver core: fix race in __device_release_driver Message-ID: <20071116203748.GA11770@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1151 Lines: 26 On Fri, Nov 16, 2007 at 11:57:28AM -0500, Alan Stern wrote: > This patch (as1013) was suggested by David Woodhouse; it fixes a race > in the driver core. If a device is unregistered at the same time as > its driver is unloaded, the driver's code pages may be unmapped while > the remove method is still running. The calls to get_driver() and > put_driver() were intended to prevent this, but they don't work if the > driver's module count has already dropped to 0. > > Instead, the patch keeps the device on the driver's list until after > the remove method has returned. This forces the necessary > synchronization to occur. Is this something that you all feel is worth getting in for 2.6.24? Does it fix a regression that just showed up, or is just a bugfix for something that people finally realized has always been there? Can it wait for 2.6.25 to get some more testing in -mm? 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/