Skip to content

Commit

Permalink
Fix the BSOD on disconnect problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Danice123 authored and george-hopkins committed Sep 13, 2017
1 parent 66d3ccf commit 6236ea8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions driver/pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 6236ea8

Please sign in to comment.