[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] PATCH for NULL pointer in netback_uevent
The following is sufficient to get domain creation working on my server (see threads "null-pointer access in netback_uevent" and "oops starting domain on 4.0.0 + 2.6.32.13-gf6fe658"). I'm not sure if it's the right solution though - should we expect a call to netback_uevent before the vif is properly set up? All I'm doing is returning 0 (success?) if the drvdata hasn't been set yet. I also think that I am seeing a different problem to Bastian, based on his debug output. James diff --git a/drivers/xen/netback/xenbus.c b/drivers/xen/netback/xenbus.c index 70636d0..a46d8b2 100644 --- a/drivers/xen/netback/xenbus.c +++ b/drivers/xen/netback/xenbus.c @@ -162,12 +162,16 @@ fail: */ static int netback_uevent(struct xenbus_device *xdev, struct kobj_uevent_env *env) { - struct backend_info *be = dev_get_drvdata(&xdev->dev); - struct xen_netif *netif = be->netif; + struct backend_info *be; + struct xen_netif *netif; char *val; DPRINTK("netback_uevent"); + be = dev_get_drvdata(&xdev->dev); + if (!be) + return 0; + netif = be->netif; val = xenbus_read(XBT_NIL, xdev->nodename, "script", NULL); if (IS_ERR(val)) { int err = PTR_ERR(val); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |