From: Daniel Stodden Subject: [PATCH 4 of 8] blkfront: Fix an unlikely xenbus crasher Date: Fri, 26 Feb 2010 16:04:52 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2447434052078813697==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Cc: Jeremy Fitzhardinge List-Id: xen-devel@lists.xenproject.org --===============2447434052078813697== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Getting partition 0 should not fail, but if it does we won't continue. Signed-off-by: Daniel Stodden CC: stable@kernel.org --===============2447434052078813697== Content-Type: text/x-patch; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=fix-bd-oops.diff # 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@kernel.org 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) --===============2447434052078813697== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============2447434052078813697==--