raising IRQL to an invalid level

Discussion in 'Windows Vista Drivers' started by Ben Geib, Jul 28, 2004.

  1. Ben Geib

    Ben Geib Guest

    Driver Verifier is creating a bug check because of an "raising IRQL to an invalid level" error. In my ISR there is a call to IoCsqRemoveNextIrp() just before scheduling a DPC. It think IoCsqRemoveNextIrp(), in the course of removing the IRP, calls KeAquireSpinLock to safeguard the queue. However, KeAquireSpinLock, according to the DDK, shouldn't be called at IRQL > DISPATCH_LEVEL. I think this is the source of the probelm, but I'm not sure how to make sure that KeAquireSpinLock() doesn't get called from the ISR. Thank you for your time.
    Ben Geib, Jul 28, 2004
    1. Advertisements

  2. but I'm not sure how to make sure that KeAquireSpinLock() doesn't get
    You can ensure that by not calling IoCsqRemoveNextIrp() from our ISR. You
    should move this call to Dpc.
    Eliyas Yakub [MSFT], Jul 29, 2004
    1. Advertisements

  3. If you want to get another request started as soon as possible, you could
    store the "next request" in a field in your device extension (with a
    different cancel routine that knows how to synchronize with the ISR). You
    could prime this member from a DPC routine if it's NULL (with some more
    appropriate synchronization).

    Peter Wieland [MSFT], Jul 29, 2004
  4. Agreed. Drivers should not issue the next request from their ISR. Rather
    they should do it in their DPC routine.
    Nar Ganapathy[MS], Jul 29, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.