[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [win-pv-devel] [PATCH] Ensure session stays locked until the reference to WatchThread is stored in it.
> -----Original Message----- > From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On > Behalf Of ben.ch@xxxxxxxxxxx > Sent: 08 November 2016 16:24 > To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Ben Chalmers <ben.chalmers@xxxxxxxxxx> > Subject: [win-pv-devel] [PATCH] Ensure session stays locked until the > reference to WatchThread is stored in it. > > From: Ben Chalmers <Ben.Chalmers@xxxxxxxxxx> > > This prevents us trying to dispose of an uniintialised WatchThread > if a session is removed (by the driver being removed) while the > session is still being created > > Signed-off-by: Ben Chalmers <ben.chalmers@xxxxxxxxxx> Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > --- > src/xeniface/wmi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/xeniface/wmi.c b/src/xeniface/wmi.c > index 8777e25..a8ebfdf 100644 > --- a/src/xeniface/wmi.c > +++ b/src/xeniface/wmi.c > @@ -1160,7 +1160,6 @@ CreateNewSession(XENIFACE_FDO *fdoData, > session->suspended=TRUE; > } > fdoData->Sessions++; > - UnlockSessions(fdoData); > InitializeObjectAttributes(&oa, NULL, OBJ_KERNEL_HANDLE, NULL, NULL); > > status = PsCreateSystemThread(&hthread, THREAD_ALL_ACCESS, &oa, > NULL, NULL, WatchCallbackThread, session); > @@ -1170,6 +1169,7 @@ CreateNewSession(XENIFACE_FDO *fdoData, > return status; > } > ObReferenceObjectByHandle(hthread, THREAD_ALL_ACCESS, NULL, > KernelMode, &session->WatchThread, NULL); > + UnlockSessions(fdoData); > RtlFreeAnsiString(&ansi); > return STATUS_SUCCESS; > } > -- > 2.7.0.windows.1 > > > _______________________________________________ > win-pv-devel mailing list > win-pv-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |