xen/blkfront: allow xenbus state transition to Closing->Closed when not Connected
authorIan Campbell <ian.campbell@citrix.com>
Tue, 19 May 2009 06:25:48 +0000 (08:25 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 19 May 2009 06:25:48 +0000 (08:25 +0200)
commit28afea5b2ffaa48f4f43d22ae8edcc384c05df80
treea14c5275a701b1453447f3e7fa3a529ce08de994
parent22ef37eed673587ac984965dc88ba94c68873291
xen/blkfront: allow xenbus state transition to Closing->Closed  when not Connected

This situation can occur when attempting to attach a block device whose
backend is an empty physical CD-ROM driver. The backend in this case
will go directly from the Initialising state to Closing->Closed.
Previously this would result in a NULL pointer deref on info->gd
(xenbus_dev_fatal does not return as a1a15ac5 seems to expect)

Cc: stable@kernel.org
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/block/xen-blkfront.c