win-pvdrivers

changeset 900:938de6b8623d

fix memory leak on suspend/resume
author James Harper <james.harper@bendigoit.com.au>
date Thu Mar 31 20:20:36 2011 +1100 (2011-03-31)
parents 5b2eff9d3941
children 70738d39e3cc
files xenpci/xenpci_highsync.c
line diff
     1.1 --- a/xenpci/xenpci_highsync.c	Wed Mar 30 11:16:45 2011 +1100
     1.2 +++ b/xenpci/xenpci_highsync.c	Thu Mar 31 20:20:36 2011 +1100
     1.3 @@ -194,5 +194,12 @@ XenPci_HighSync(PXENPCI_HIGHSYNC_FUNCTIO
     1.4  
     1.5    KdPrint((__DRIVER_NAME "     Waiting for highsync_complete_event\n"));
     1.6    KeWaitForSingleObject(&highsync_info->highsync_complete_event, Executive, KernelMode, FALSE, NULL);
     1.7 +  /* wait until nr_procs_at_dispatch_level drops to 0 indicating that nothing else requires highsync_info */
     1.8 +  while (highsync_info->nr_procs_at_dispatch_level)
     1.9 +  {
    1.10 +    KeStallExecutionProcessor(1);
    1.11 +    KeMemoryBarrier();
    1.12 +  }
    1.13 +  ExFreePoolWithTag(highsync_info, XENPCI_POOL_TAG);
    1.14    FUNCTION_EXIT();
    1.15  }