[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xenbus: fix possible crash in xenbus_uevent_backend


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Olaf Hering <olaf@xxxxxxxxx>
  • Date: Mon, 18 Jul 2011 14:40:59 +0200
  • Delivery-date: Mon, 18 Jul 2011 05:48:06 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Fix possible NULL pointer crash in xenbus_uevent_backend().
The variable to check for should probably be bus.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

Index: linux-3.0-rc7-xen-kexec/drivers/xen/xenbus/xenbus_probe_backend.c
===================================================================
--- linux-3.0-rc7-xen-kexec.orig/drivers/xen/xenbus/xenbus_probe_backend.c
+++ linux-3.0-rc7-xen-kexec/drivers/xen/xenbus/xenbus_probe_backend.c
@@ -104,7 +104,7 @@ static int xenbus_uevent_backend(struct
 
        xdev = to_xenbus_device(dev);
        bus = container_of(xdev->dev.bus, struct xen_bus_type, bus);
-       if (xdev == NULL)
+       if (bus == NULL)
                return -ENODEV;
 
        /* stuff we want to pass to /sbin/hotplug */
Index: linux-3.0-rc7-xen-kexec/include/linux/compiler.h

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.