From: cl349@firebug.cl.cam.ac.uk Date: Wed, 24 Aug 2005 20:43:16 +0000 (+0000) Subject: Watch may fire before we've allocated the interface structure. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16844^2~15 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9df7b4b119b8107a3c7da4ea3c2c6908129a57c5;p=xen.git Watch may fire before we've allocated the interface structure. Signed-off-by: Christian Limpach --- diff --git a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c index 9d255aefd8..61861b3735 100644 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c @@ -69,7 +69,7 @@ static void frontend_changed(struct xenbus_watch *watch, const char *node) device_unregister(&be->dev->dev); return; } - if (be->blkif->status == CONNECTED) + if (be->blkif == NULL || be->blkif->status == CONNECTED) return; err = xenbus_gather(be->frontpath, "grant-id", "%lu", &sharedmfn,