diff --git a/driver/pnp.c b/driver/pnp.c index 5651787a..c7019efd 100755 --- a/driver/pnp.c +++ b/driver/pnp.c @@ -988,7 +988,9 @@ void complete_pending_read_irp(PPDO_DEVICE_DATA pdodata) return; irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED; IoSetCancelRoutine(irp, NULL); + KeRaiseIrql(DISPATCH_LEVEL, &oldirql); IoCompleteRequest (irp, IO_NO_INCREMENT); + KeLowerIrql(oldirql); return; } @@ -998,6 +1000,7 @@ void complete_pending_irp(PPDO_DEVICE_DATA pdodata) struct urb_req * urb_r; PLIST_ENTRY le; KIRQL oldirql; + KIRQL oldirql2; int count=0; LARGE_INTEGER interval; @@ -1031,7 +1034,9 @@ void complete_pending_irp(PPDO_DEVICE_DATA pdodata) ExFreeToNPagedLookasideList(&g_lookaside, urb_r); irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED; IoSetCancelRoutine(irp, NULL); + KeRaiseIrql(DISPATCH_LEVEL, &oldirql2); IoCompleteRequest (irp, IO_NO_INCREMENT); + KeLowerIrql(oldirql2); count++; }while(1); }