From: Keir Fraser Date: Mon, 1 Mar 2010 09:56:52 +0000 (+0000) Subject: blkfront: Fix an unlikely xenbus crasher X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2f2aad64b69230c528edff75f199a1a1bea03040;p=legacy%2Flinux-2.6.18-xen.git blkfront: Fix an unlikely xenbus crasher Getting partition 0 should not fail, but if it does we won't continue. Signed-off-by: Daniel Stodden Signed-off-by: Jan Beulich --- diff --git a/drivers/xen/blkfront/blkfront.c b/drivers/xen/blkfront/blkfront.c index 40d746d6..54b14408 100644 --- a/drivers/xen/blkfront/blkfront.c +++ b/drivers/xen/blkfront/blkfront.c @@ -286,8 +286,10 @@ static void backend_changed(struct xenbus_device *dev, case XenbusStateClosing: bd = bdget(info->dev); - if (bd == NULL) + if (bd == NULL) { xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); + break; + } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) down(&bd->bd_sem);