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-changelog

[Xen-changelog] Put watch on device node only if probe was sucessful.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Put watch on device node only if probe was sucessful.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Dec 2005 19:50:06 +0000
Delivery-date: Thu, 15 Dec 2005 19:51:59 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 39a6161261041617d791279ce7dfdd60ce96709b
# Parent  25d0ba51338eb8dd6446cc2083ee34d89a6f6fcf
Put watch on device node only if probe was sucessful.

This fix segfault on netfront when creating more than three network devices on
domU.

Signed-off-by: Murillo F. Bernardes <mfb@xxxxxxxxxx>

diff -r 25d0ba51338e -r 39a616126104 
linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Wed Dec 14 
12:52:02 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c    Thu Dec 15 
13:38:16 2005
@@ -338,6 +338,21 @@
 
        DPRINTK("");
 
+       if (!drv->probe) {
+               err = -ENODEV;
+               goto fail;
+       }
+
+       id = match_device(drv->ids, dev);
+       if (!id) {
+               err = -ENODEV;
+               goto fail;
+       }
+
+       err = drv->probe(dev, id);
+       if (err)
+               goto fail;
+
        err = talk_to_otherend(dev);
        if (err) {
                printk(KERN_WARNING
@@ -345,21 +360,6 @@
                       dev->nodename);
                return err;
        }
-
-       if (!drv->probe) {
-               err = -ENODEV;
-               goto fail;
-       }
-
-       id = match_device(drv->ids, dev);
-       if (!id) {
-               err = -ENODEV;
-               goto fail;
-       }
-
-       err = drv->probe(dev, id);
-       if (err)
-               goto fail;
 
        return 0;
 fail:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Put watch on device node only if probe was sucessful., Xen patchbot -unstable <=