The uevent method of Xen netback does not check if the the network
device is already setup and tries to dereference a null-pointer it not.
Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
---
drivers/xen/netback/xenbus.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/netback/xenbus.c b/drivers/xen/netback/xenbus.c
index 70636d0..88262bb 100644
--- a/drivers/xen/netback/xenbus.c
+++ b/drivers/xen/netback/xenbus.c
@@ -163,7 +163,6 @@ 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;
char *val;
DPRINTK("netback_uevent");
@@ -182,7 +181,7 @@ static int netback_uevent(struct xenbus_device *xdev,
struct kobj_uevent_env *en
kfree(val);
}
- if (add_uevent_var(env, "vif=%s", netif->dev->name))
+ if (be && be->netif && add_uevent_var(env, "vif=%s",
be->netif->dev->name))
return -ENOMEM;
return 0;
--
1.7.1
--
To live is always desirable.
-- Eleen the Capellan, "Friday's Child", stardate 3498.9
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|