On 8/3/21 3:19 AM, RĂ©mi Bernon wrote:
@@ -584,15 +567,13 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp) FIXME("Unsupported ioctl %x (device=%x access=%x func=%x method=%x)\n", code, code >> 16, (code >> 14) & 3, (code >> 2) & 0xfff, code & 3); irp->IoStatus.Status = STATUS_NOT_SUPPORTED;
rc = STATUS_UNSUCCESSFUL; break; } }
if (rc != STATUS_PENDING)
IoCompleteRequest( irp, IO_NO_INCREMENT );
- if (irp->IoStatus.Status != STATUS_PENDING) IoCompleteRequest( irp, IO_NO_INCREMENT );
- return rc;
return irp->IoStatus.Status; }
NTSTATUS WINAPI pdo_read(DEVICE_OBJECT *device, IRP *irp)
You can't access the IRP after calling IoCompleteRequest().
There are other instances in this patch of the same thing.