WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xenbus: fix possible crash in xenbus_uevent_backend
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 18 Jul 2011 14:40:59 +0200
Delivery-date: Mon, 18 Jul 2011 05:48:06 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1310992874; l=776; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=RCqTpJZVKPf1fSkU5Y2XsniGNRI=; b=LMqXEciztl5QXOnrqruuQrPf0sIF8yOTHeegR5awI4AuT+PYJWadnnFCxB98STPOvO9 79s7T4JHfCVk6P5vP3vMy1zTrWWfxlCZUARRhlL1f/pCTHJ2EZsGI8ariK3GyOASQOnHV UvgXMoAw4qnN4AdgmkEhZ5mqV03+92AiS1Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
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