Watch may fire before we've allocated the interface structure.
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 24 Aug 2005 20:43:16 +0000 (20:43 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Wed, 24 Aug 2005 20:43:16 +0000 (20:43 +0000)
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c

index 9d255aefd893b414e149e30112e5f765a6c2cea0..61861b3735f29f40e225c78ef33426796a4c7562 100644 (file)
@@ -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,