From: Kay Sievers <kay.sievers@vrfy.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>,
Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: BUG in: Driver core: convert block from raw kobjects to core devices
Date: Fri, 19 Oct 2007 16:15:53 +0200 [thread overview]
Message-ID: <1192803353.3308.14.camel@lov.site> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0710191004090.4091-100000@iolanthe.rowland.org>
On Fri, 2007-10-19 at 10:09 -0400, Alan Stern wrote:
> On Fri, 19 Oct 2007, Kay Sievers wrote:
>
> > > This accounts for everything in del_gendisk except the final
> > > put_device. Evidently it doesn't belong there. There's no matching
> > > get_device in add_disk or register_disk.
> >
> > Hmm, do you have kobject debugging enabled? Do you ever see something
> > like: "kobject sdb: cleaning up" when you remove the put_device()?
>
> I didn't enable kobject debugging, but I did put a printk statement in
> drivers/scsi/sd.c:scsi_disk_release(), which is the release routine for
> the scsi_disk structure. It does the final put_disk() call -- or at
> least, this is _supposed_ to be the final call.
>
> With my patch, just before the call to put_disk the value of
> disk->dev.kobj.kref.refcount is 1. Without my patch, the value is
> garbage (probably a slab poison value, but I printed it in decimal
> rather than hex so I can't be sure).
>
> Don't you have a USB storage device? It should be easy for you to test
> this on your own system.
Sure, I have, and tried a lot of times, and all seemed correct here with
the final put. I don't say that it's the right fix, but without it, the
disk device object is never released here, it only gets removed from
sysfs.
Kay
next prev parent reply other threads:[~2007-10-19 14:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 19:23 BUG in: Driver core: convert block from raw kobjects to core devices Alan Stern
2007-10-18 19:27 ` Greg KH
2007-10-18 19:27 ` Kay Sievers
2007-10-18 20:08 ` Alan Stern
2007-10-19 1:27 ` Kay Sievers
2007-10-19 14:09 ` Alan Stern
2007-10-19 14:15 ` Kay Sievers [this message]
2007-10-19 17:11 ` Alan Stern
2007-10-19 23:06 ` Kay Sievers
2007-10-21 1:33 ` Alan Stern
2007-10-21 19:03 ` Kay Sievers
2007-10-22 0:26 ` Alan Stern
2007-10-23 0:01 ` Kay Sievers
2007-10-23 4:14 ` Alan Stern
2007-10-23 11:27 ` Kay Sievers
2007-10-24 18:01 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1192803353.3308.14.camel@lov.site \
--to=kay.sievers@vrfy.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox