win-pvdrivers

changeset 620:bddc14051767

Fixed potential problem when XenPci_BalloonHandler() is called via xen watch, but no data was actually written. This happens sometime when the watch is first setup.
author Steve Meisner <steve.meisner@virtualcomputer.com>
date Wed Jul 29 12:11:16 2009 -0400 (2009-07-29)
parents 5383e500d68a
children 9c7b7fbacd7f
files xenpci/xenpci_fdo.c
line diff
     1.1 --- a/xenpci/xenpci_fdo.c	Wed Jul 29 19:23:34 2009 +1000
     1.2 +++ b/xenpci/xenpci_fdo.c	Wed Jul 29 12:11:16 2009 -0400
     1.3 @@ -329,6 +329,14 @@ XenPci_BalloonHandler(char *Path, PVOID 
     1.4  
     1.5    XenBus_Read(xpdd, XBT_NIL, BALLOON_PATH, &value);
     1.6    
     1.7 +  if (value == NULL)
     1.8 +  {
     1.9 +    KdPrint((__DRIVER_NAME "     Failed to read value\n"));
    1.10 +    XenBus_EndTransaction(xpdd, xbt, 0, &retry);
    1.11 +    FUNCTION_EXIT();
    1.12 +    return;
    1.13 +  }
    1.14 +
    1.15    if (atoi(value) > 0)
    1.16      xpdd->target_memory = atoi(value) >> 10; /* convert to MB */
    1.17