Skip to contentSkip to conversation

Linux: Fwd: blkfront: Fix an unlikely xenbus crasher

PATCH New Jan Beulich 1 participant 1 message Mar 1, 2010 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Linux: Fwd: blkfront: Fix an unlikely xenbus crasher

Getting partition 0 should not fail, but if it does we won't continue.

drivers/xen/blkfront/blkfront.c +3 -1
@@ -285,8 +285,10 @@
 
 	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);

Subject: blkfront: Fix an unlikely xenbus crasher.

Getting partition 0 should not fail, but if it does we won't continue.

drivers/xen/blkfront/blkfront.c +3 -1
@@ -285,8 +285,10 @@
 
 	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);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel