|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XENVBD PATCH] thread: Wait for the thread if ObReferenceObjectByHandle fails
If ObReferenceObjectByHandle fails, the thread would have already
started. We need to wait for it to exit before cleaning up.
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
src/xenvbd/thread.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/xenvbd/thread.c b/src/xenvbd/thread.c
index 22baf10..632aca0 100644
--- a/src/xenvbd/thread.c
+++ b/src/xenvbd/thread.c
@@ -30,6 +30,7 @@
* SUCH DAMAGE.
*/
+#include <ntifs.h>
#include <ntddk.h>
#include "util.h"
@@ -207,6 +208,7 @@ fail3:
Error("fail3\n");
__ThreadAlert(Thread);
+ ZwWaitForSingleObject(Handle, FALSE, NULL);
ZwClose(Handle);
fail2:
--
2.56.0.windows.4
--
Ngoc Tu Dinh | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |