xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* PATCH for NULL pointer in netback_uevent
@ 2010-05-28  0:58 James Harper
  2010-05-28  7:15 ` Jan Beulich
  0 siblings, 1 reply; 4+ messages in thread
From: James Harper @ 2010-05-28  0:58 UTC (permalink / raw)
  To: xen-devel

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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-29 11:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28  0:58 PATCH for NULL pointer in netback_uevent James Harper
2010-05-28  7:15 ` Jan Beulich
2010-05-28  7:22   ` James Harper
2010-05-29 11:13   ` Andrew Lyon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).