From: Jens Axboe <jens.axboe@oracle.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Lalancette <clalance@redhat.com>,
virtualization@lists.linux-foundation.org, kvm@vger.kernel.org
Subject: Re: [Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe]
Date: Thu, 22 May 2008 13:35:19 +0200 [thread overview]
Message-ID: <20080522113517.GC7712@kernel.dk> (raw)
In-Reply-To: <200805222133.01686.rusty@rustcorp.com.au>
On Thu, May 22 2008, Rusty Russell wrote:
> On Wednesday 21 May 2008 23:12:39 Chris Lalancette wrote:
> > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
> > index 4962e62..c678ac5 100644
> > --- a/drivers/block/virtio_blk.c
> > +++ b/drivers/block/virtio_blk.c
> > @@ -294,6 +294,7 @@ static void virtblk_remove(struct virtio_device *vdev)
> > vdev->config->reset(vdev);
> >
> > blk_cleanup_queue(vblk->disk->queue);
> > + del_gendisk(vblk->disk);
> > put_disk(vblk->disk);
> > unregister_blkdev(major, "virtblk");
> > mempool_destroy(vblk->pool);
>
> Thanks Chris, it seems reasonable and I'm sure it works (kinda hard to
> test here, it's my root block dev). Other drivers seem to do
> blk_cleanup_queue() *after* del_gendisk: does it matter?
>
> Jens CC'd: he's gentle with my dumb questions... Rusty.
del_gendisk() can generate IO, so it would seem safer to do that
_before_ putting the queue reference :-)
--
Jens Axboe
next prev parent reply other threads:[~2008-05-22 11:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 13:12 [Fwd: [PATCH]: Fix crash in virtio_blk during modprobe ; rmmod ; modprobe] Chris Lalancette
2008-05-22 11:33 ` Rusty Russell
2008-05-22 11:35 ` Jens Axboe [this message]
2008-05-22 12:03 ` Chris Lalancette
2008-05-22 12:07 ` Jens Axboe
2008-05-23 1:16 ` Rusty Russell
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=20080522113517.GC7712@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=clalance@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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