ia64/xen-unstable
changeset 7566:8e1bfcb901e5
Once grant refs run out, netfront prints a nice message, but doesn't set
err properly to notify the caller, and the domU crashes. (See bug 183 for
details).
Signed-off-by: Jim Dykman <dykman@us.ibm.com>
err properly to notify the caller, and the domU crashes. (See bug 183 for
details).
Signed-off-by: Jim Dykman <dykman@us.ibm.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Sun Oct 30 16:43:05 2005 +0100 (2005-10-30) |
parents | c7006e46cd06 |
children | 32695e99cfc8 |
files | linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Sun Oct 30 16:40:05 2005 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Sun Oct 30 16:43:05 2005 +0100 1.3 @@ -877,6 +877,7 @@ static int create_netdev(int handle, str 1.4 if (gnttab_alloc_grant_references(NETIF_TX_RING_SIZE, 1.5 &np->gref_tx_head) < 0) { 1.6 printk(KERN_ALERT "#### netfront can't alloc tx grant refs\n"); 1.7 + err = -ENOMEM; 1.8 goto exit; 1.9 } 1.10 /* A grant for every rx ring slot */ 1.11 @@ -884,6 +885,7 @@ static int create_netdev(int handle, str 1.12 &np->gref_rx_head) < 0) { 1.13 printk(KERN_ALERT "#### netfront can't alloc rx grant refs\n"); 1.14 gnttab_free_grant_references(np->gref_tx_head); 1.15 + err = -ENOMEM; 1.16 goto exit; 1.17 } 1.18