[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel] Re: [Patch] Fix blktap oops on domain shutdown
- To: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
- From: "Andrew Warfield" <andrew.warfield@xxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 12:04:55 -0700
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Julian Chesterfield <jac90@xxxxxxxxx>
- Delivery-date: Thu, 28 Sep 2006 12:07:22 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=PmdOFpcFoOPpH0gy+aRw+m3O+TIbLK06FDBx8SMBQL6uipkL+Z1W7Hrd2zYZy1TMo/F8QZjzh/TU1Dn45YsU0khefZ3TuTFdMrqaXEs7UTLc6nLafN0TTi+H64C6NlPAsPlUXEcPwuDVTNWYm7gCvg+9SKN3Uifgh/fyqzcrKKM=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
Applied, thank you.
a.
On 9/28/06, Stephen C. Tweedie <sct@xxxxxxxxxx> wrote:
When a domain shuts down with a blktap-backed block device open, it can
easily cause a dom0 oops. The XenbusStateClosing event can occur while
the tapdisk userland thread is still processing IO requests (eg.
readaheads) from the domU. But the xenbus state handler calls
tap_blkif_unmap(), unmapping the blkif->blk_ring.sring rin buffer, so
when the tapdisk thread next calls the BLKTAP_IOCTL_KICK_FE to return
the completion event to the FE via that ring buffer, it oopses.
This can be fixed simply by not calling tap_blkif_unmap() in this case;
the ring buffer will still be unmapped later on when the blkif is
destroyed by blktap_remove(), only then it will properly wait for the
blkif refcnt to reach zero before doing so.
Signed-off-by: Stephen Tweedie <sct@xxxxxxxxxx>
diff -r bd811e94d293 -r ed51caee4fe6
linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c Tue Sep 26 19:50:07
2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c Thu Sep 28 15:38:25
2006 +0100
@@ -273,7 +273,6 @@ static void tap_frontend_changed(struct
kthread_stop(be->blkif->xenblkd);
be->blkif->xenblkd = NULL;
}
- tap_blkif_unmap(be->blkif);
xenbus_switch_state(dev, XenbusStateClosing);
break;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|