[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH 6/6] Ensure defunct watches have NULL handles



Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xeniface/wmi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c
index 0f63ef5..c73e990 100644
--- a/src/xeniface/wmi.c
+++ b/src/xeniface/wmi.c
@@ -884,6 +884,7 @@ VOID WatchCallbackThread(__in PVOID StartContext) {
                         
XenIfaceDebugPrint(WARNING,"SessionSuspendResumeUnwatch %p\n", 
watch->watchhandle);
 
                         XENBUS_STORE(WatchRemove, 
&watch->fdoData->StoreInterface, watch->watchhandle);
+                        watch->watchhandle = NULL;
                         StartWatch(watch->fdoData, watch);
                     }
                 }
@@ -1187,6 +1188,7 @@ RemoveSessionLocked(XENIFACE_FDO *fdoData,
     SessionRemoveWatchesLocked(session);
     if (session->transaction != NULL) {
         XENBUS_STORE(TransactionEnd, &fdoData->StoreInterface, 
session->transaction, FALSE);
+        session->transaction = NULL;
     }
     session->closing = TRUE;
     KeSetEvent(&session->SessionChangedEvent, IO_NO_INCREMENT, FALSE);
@@ -1230,6 +1232,7 @@ void SessionUnwatchWatchesLocked(XenStoreSession *session)
         XenIfaceDebugPrint(TRACE,"Suspend unwatch %p\n", watch->watchhandle);
 
         XENBUS_STORE(WatchRemove, &watch->fdoData->StoreInterface, 
watch->watchhandle);
+        watch->watchhandle = NULL;
         watch = (XenStoreWatch *)watch->listentry.Flink;
     }
     XenIfaceDebugPrint(TRACE, "WATCHLIST for session %p-----------\n",session);
-- 
1.9.4.msysgit.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.