win-pvdrivers

changeset 873:4722ecc909c3

Fix crash on concurrent write
author James Harper <james.harper@bendigoit.com.au>
date Thu Mar 03 23:21:10 2011 +1100 (2011-03-03)
parents e476e0b66aa6
children f5a973a8a10b
files xenvbd/xenvbd_scsiport.c
line diff
     1.1 --- a/xenvbd/xenvbd_scsiport.c	Thu Mar 03 21:05:11 2011 +1100
     1.2 +++ b/xenvbd/xenvbd_scsiport.c	Thu Mar 03 23:21:10 2011 +1100
     1.3 @@ -429,8 +429,10 @@ XenVbd_PutQueuedSrbsOnRing(PXENVBD_DEVIC
     1.4          sector_number, block_count, sector_number2, block_count2));
     1.5        /* put the srb back at the start of the queue */
     1.6        InsertHeadList(&xvdd->srb_list, (PLIST_ENTRY)srb->SrbExtension);
     1.7 -      break; /* stall the queue but fall through so the notify is triggered */
     1.8 +      break;
     1.9      }
    1.10 +    if (i < MAX_SHADOW_ENTRIES)
    1.11 +      break; /* stall the queue but fall through so the notify is triggered */    
    1.12  
    1.13      remaining = block_count * 512;
    1.14      shadow = get_shadow_from_freelist(xvdd);