win-pvdrivers

changeset 686:c548d9eb5107 0.10.0.130

add an ASSERT to trap bad DMA buffers
author James Harper <james.harper@bendigoit.com.au>
date Wed Oct 14 14:47:00 2009 +1100 (2009-10-14)
parents c13ccf5a629b
children b890f422c1f4
files xenvbd/xenvbd.c
line diff
     1.1 --- a/xenvbd/xenvbd.c	Wed Oct 14 14:46:39 2009 +1100
     1.2 +++ b/xenvbd/xenvbd.c	Wed Oct 14 14:47:00 2009 +1100
     1.3 @@ -398,9 +398,8 @@ XenVbd_PutSrbOnRing(PXENVBD_DEVICE_DATA 
     1.4      length = min(PAGE_SIZE - offset, remaining);
     1.5      ASSERT((offset & 511) == 0);
     1.6      ASSERT((length & 511) == 0);
     1.7 -    //KdPrint((__DRIVER_NAME "     length(a) = %d\n", length));
     1.8 +    ASSERT(offset + length <= PAGE_SIZE);
     1.9      shadow->req.seg[shadow->req.nr_segments].gref = gref;
    1.10 -    //KdPrint((__DRIVER_NAME "     length(b) = %d\n", length));
    1.11      shadow->req.seg[shadow->req.nr_segments].first_sect = (UCHAR)(offset >> 9);
    1.12      shadow->req.seg[shadow->req.nr_segments].last_sect = (UCHAR)(((offset + length) >> 9) - 1);
    1.13      remaining -= length;