ia64/xen-unstable

changeset 14981:b915eb96097a

Ensure blk{tap/back}'s vm_area is not freed twice on error case.
Signed-off-by: Jake Wires <jwires@xensource.com>
author Jake Wires <jwires@xensource.com>
date Fri Apr 27 17:54:06 2007 -0700 (2007-04-27)
parents aedc55daf92b
children c12380cddec5
files linux-2.6-xen-sparse/drivers/xen/blkback/interface.c linux-2.6-xen-sparse/drivers/xen/blktap/interface.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c	Fri Apr 27 16:27:07 2007 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/interface.c	Fri Apr 27 17:54:06 2007 -0700
     1.3 @@ -136,6 +136,7 @@ int blkif_map(blkif_t *blkif, unsigned l
     1.4  	{
     1.5  		unmap_frontend_page(blkif);
     1.6  		free_vm_area(blkif->blk_ring_area);
     1.7 +		blkif->blk_rings.common.sring = NULL;
     1.8  		return err;
     1.9  	}
    1.10  	blkif->irq = err;
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/blktap/interface.c	Fri Apr 27 16:27:07 2007 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blktap/interface.c	Fri Apr 27 17:54:06 2007 -0700
     2.3 @@ -137,6 +137,7 @@ int tap_blkif_map(blkif_t *blkif, unsign
     2.4  	if (err < 0) {
     2.5  		unmap_frontend_page(blkif);
     2.6  		free_vm_area(blkif->blk_ring_area);
     2.7 +		blkif->blk_rings.common.sring = NULL;
     2.8  		return err;
     2.9  	}
    2.10  	blkif->irq = err;