ia64/xen-unstable

changeset 8388:39a616126104

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@br.ibm.com>
author emellor@leeni.uk.xensource.com
date Thu Dec 15 13:38:16 2005 +0000 (2005-12-15)
parents 25d0ba51338e
children c28794c159c1
files linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Dec 14 12:52:02 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Thu Dec 15 13:38:16 2005 +0000
     1.3 @@ -338,14 +338,6 @@ static int xenbus_dev_probe(struct devic
     1.4  
     1.5  	DPRINTK("");
     1.6  
     1.7 -	err = talk_to_otherend(dev);
     1.8 -	if (err) {
     1.9 -		printk(KERN_WARNING
    1.10 -		       "xenbus_probe: talk_to_otherend on %s failed.\n",
    1.11 -		       dev->nodename);
    1.12 -		return err;
    1.13 -	}
    1.14 -
    1.15  	if (!drv->probe) {
    1.16  		err = -ENODEV;
    1.17  		goto fail;
    1.18 @@ -361,6 +353,14 @@ static int xenbus_dev_probe(struct devic
    1.19  	if (err)
    1.20  		goto fail;
    1.21  
    1.22 +	err = talk_to_otherend(dev);
    1.23 +	if (err) {
    1.24 +		printk(KERN_WARNING
    1.25 +		       "xenbus_probe: talk_to_otherend on %s failed.\n",
    1.26 +		       dev->nodename);
    1.27 +		return err;
    1.28 +	}
    1.29 +
    1.30  	return 0;
    1.31  fail:
    1.32  	xenbus_dev_error(dev, err, "xenbus_dev_probe on %s", dev->nodename);