ia64/xen-unstable

changeset 1044:b51f4782dd4d

bitkeeper revision 1.683 (400c33c2I0UquUQa-QChvyqrE7-GRA)

xen_vbd.c:
Fix loop bounds when setting vbd extents.
author kaf24@scramble.cl.cam.ac.uk
date Mon Jan 19 19:45:06 2004 +0000 (2004-01-19)
parents eb4a4fe67cdc
children 0e414c9b0f17
files xen/drivers/block/xen_vbd.c
line diff
     1.1 --- a/xen/drivers/block/xen_vbd.c	Mon Jan 19 19:41:53 2004 +0000
     1.2 +++ b/xen/drivers/block/xen_vbd.c	Mon Jan 19 19:45:06 2004 +0000
     1.3 @@ -288,7 +288,7 @@ long vbd_setextents(vbd_setextents_t *se
     1.4  
     1.5      /* Construct the new extent list. */
     1.6      new_extents = NULL;
     1.7 -    for ( i = setextents->nr_extents; i > 0; i-- )
     1.8 +    for ( i = setextents->nr_extents - 1; i >= 0; i-- )
     1.9      {
    1.10          if ( unlikely(copy_from_user(&e, 
    1.11                                       &setextents->extents[i],