# HG changeset patch # User Daniel Stodden # Date 1267197954 28800 # Node ID fcefa69c0dbf52a86a9037ad14f81d3252f387ff # Parent 3b7ebe4ce587d81361bf9afb5825420fa3d4c9d7 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 CC: stable@xxxxxxxxxx diff -r 3b7ebe4ce587 -r fcefa69c0dbf drivers/block/xen-blkfront.c --- a/drivers/block/xen-blkfront.c Fri Feb 26 07:25:53 2010 -0800 +++ b/drivers/block/xen-blkfront.c Fri Feb 26 07:25:54 2010 -0800 @@ -985,8 +985,10 @@ break; } bd = bdget_disk(info->gd, 0); - if (bd == NULL) + if (bd == NULL) { xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); + break; + } mutex_lock(&bd->bd_mutex); if (info->users > 0)