|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH 4/4] Cancel all outstanding IRPs on StreamDestroy
From: Owen Smith <owen.smith@xxxxxxxxxx>
After IRP_MJ_CLEANUP completes, all outstanding IRPs (for that FileObject)
are cancelled. This would attempt to use the cancel safe queue and list
which are now zeroed, and lead to a 0xCC Bugcheck.
Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
src/xencons/stream.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/xencons/stream.c b/src/xencons/stream.c
index 0f4c129..02bb486 100644
--- a/src/xencons/stream.c
+++ b/src/xencons/stream.c
@@ -188,7 +188,7 @@ StreamCsqCompleteCanceledIrp(
Irp->IoStatus.Information = 0;
Irp->IoStatus.Status = STATUS_CANCELLED;
- Trace("COMPLETE (%02x:%s)\n",
+ Trace("CANCELLED (%02x:%s)\n",
MajorFunction,
MajorFunctionName(MajorFunction));
@@ -418,6 +418,18 @@ StreamDestroy(
ThreadJoin(Stream->Thread);
Stream->Thread = NULL;
+ for (;;) {
+ PIRP Irp;
+
+ Irp = IoCsqRemoveNextIrp(&Stream->Csq, NULL);
+ if (Irp == NULL)
+ break;
+
+ StreamCsqCompleteCanceledIrp(&Stream->Csq,
+ Irp);
+ }
+ ASSERT(IsListEmpty(&Stream->List));
+
RtlZeroMemory(&Stream->Csq, sizeof (IO_CSQ));
RtlZeroMemory(&Stream->List, sizeof (LIST_ENTRY));
--
2.8.3
_______________________________________________
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 |