Zebediah Figura : ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest().

Alexandre Julliard julliard at winehq.org
Thu Feb 11 15:37:15 CST 2021


Module: wine
Branch: master
Commit: c4cd339a21555def8eb64794f226a129718a8390
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c4cd339a21555def8eb64794f226a129718a8390

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed Feb 10 21:42:36 2021 -0600

ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntoskrnl.exe/ntoskrnl.c     | 1 +
 dlls/ntoskrnl.exe/tests/driver.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 9dc5809614a..1829188680d 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1941,6 +1941,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
 
     if (irp->Flags & IRP_DEALLOCATE_BUFFER)
         HeapFree( GetProcessHeap(), 0, irp->AssociatedIrp.SystemBuffer );
+    if (irp->UserIosb) *irp->UserIosb = irp->IoStatus;
     if (irp->UserEvent) KeSetEvent( irp->UserEvent, IO_NO_INCREMENT, FALSE );
 
     IoFreeIrp( irp );
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index eb4620ad25d..f9329adfc54 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -877,8 +877,8 @@ static void test_call_driver(DEVICE_OBJECT *device)
     irp->IoStatus.Status = STATUS_SUCCESS;
     irp->IoStatus.Information = 123;
     IoCompleteRequest(irp, IO_NO_INCREMENT);
-    todo_wine ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
-    todo_wine ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
+    ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
+    ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
 
     KeInitializeEvent(&event, NotificationEvent, FALSE);
 




More information about the wine-cvs mailing list