Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1766016AbXJRT23 (ORCPT ); Thu, 18 Oct 2007 15:28:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761665AbXJRT2I (ORCPT ); Thu, 18 Oct 2007 15:28:08 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:48986 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759116AbXJRT2G (ORCPT ); Thu, 18 Oct 2007 15:28:06 -0400 Date: Thu, 18 Oct 2007 12:27:41 -0700 From: Greg KH To: Alan Stern Cc: Kay Sievers , Kernel development list Subject: Re: BUG in: Driver core: convert block from raw kobjects to core devices Message-ID: <20071018192741.GA18786@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: 1436 Lines: 44 On Thu, Oct 18, 2007 at 03:23:49PM -0400, Alan Stern wrote: > This patch (as1004) fixes a refcounting bug in the development version > of the block-device core. > > Signed-off-by: Alan Stern > > --- > > Kay, you have got to start testing your patches better! Finding and > fixing refcount errors is _not_ one of my favorite ways to pass the > time. For example, you could see what happens when you insert and > unplug a USB flash disk a few times. > > Greg, you'll probably want to just fold this in with Kay's > block-device.patch. > > Alan Stern > > > Index: usb-2.6/fs/partitions/check.c > =================================================================== > --- usb-2.6.orig/fs/partitions/check.c > +++ usb-2.6/fs/partitions/check.c > @@ -516,5 +516,4 @@ void del_gendisk(struct gendisk *disk) > sysfs_remove_link(&block_depr, disk->dev.bus_id); > #endif > device_del(&disk->dev); > - put_device(&disk->dev); > } Are we sure this is correct? Kay and I spent a lot of time (well, Kay did all the work) a few weeks ago trying to track down a bug in this area, and this was the solution from what I remember. Kay, thoughts? 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/