xen/blkfront: allow xenbus state transition to Closing->Closed when not Connected
commit6ff8713a30f8f4dff1174b4ea35a0b44679f49a9
authorIan Campbell <ian.campbell@citrix.com>
Tue, 19 May 2009 06:25:48 +0000 (19 08:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Jun 2009 16:39:59 +0000 (15 09:39 -0700)
tree223763857ba7fdd2adb06b4ecbec99d345e777c0
parenteb52dd3fe61f1b0e51f48bd7785939167835210d
xen/blkfront: allow xenbus state transition to Closing->Closed when not Connected

commit 28afea5b2ffaa48f4f43d22ae8edcc384c05df80 upstream.

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)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/xen-blkfront.c