]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
blkfront: Fix an unlikely xenbus crasher
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 1 Mar 2010 09:56:52 +0000 (09:56 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 1 Mar 2010 09:56:52 +0000 (09:56 +0000)
Getting partition 0 should not fail, but if it does we won't continue.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/blkfront/blkfront.c

index 40d746d68edfd667cc81c1128d37e699cf7e9b4d..54b14408f9b6e0bbc6ce8a70c8608aae9f1c563f 100644 (file)
@@ -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);