win-pvdrivers

changeset 956:6e8c5e65f498 0.11.0.324

Fix a bug that will cause a hang after 2^32 xenvbd i/o's.
(thanks to Andreas Kinzler <ml-xen-devel@hfp.de>)
author James Harper <james.harper@bendigoit.com.au>
date Thu Dec 01 14:32:00 2011 +1100 (2011-12-01)
parents 8fc299076054
children bf9ab7013cd6
files xenvbd/xenvbd_scsiport.c xenvbd/xenvbd_storport.c
line diff
     1.1 --- a/xenvbd/xenvbd_scsiport.c	Thu Nov 10 21:14:48 2011 +1100
     1.2 +++ b/xenvbd/xenvbd_scsiport.c	Thu Dec 01 14:32:00 2011 +1100
     1.3 @@ -948,7 +948,7 @@ XenVbd_HwScsiInterrupt(PVOID DeviceExten
     1.4    {
     1.5      rp = xvdd->ring.sring->rsp_prod;
     1.6      KeMemoryBarrier();
     1.7 -    for (i = xvdd->ring.rsp_cons; i < rp; i++)
     1.8 +    for (i = xvdd->ring.rsp_cons; i != rp; i++)
     1.9      {
    1.10        rep = XenVbd_GetResponse(xvdd, i);
    1.11  /*
     2.1 --- a/xenvbd/xenvbd_storport.c	Thu Nov 10 21:14:48 2011 +1100
     2.2 +++ b/xenvbd/xenvbd_storport.c	Thu Dec 01 14:32:00 2011 +1100
     2.3 @@ -1105,7 +1105,7 @@ XenVbd_HandleEventSynchronised(PVOID Dev
     2.4    {
     2.5      rp = xvdd->ring.sring->rsp_prod;
     2.6      KeMemoryBarrier();
     2.7 -    for (i = xvdd->ring.rsp_cons; i < rp; i++)
     2.8 +    for (i = xvdd->ring.rsp_cons; i != rp; i++)
     2.9      {
    2.10        rep = XenVbd_GetResponse(xvdd, i);
    2.11  /*