Calling 'WdfIoQueueFindRequest' from an ISR DPC

Just drop interrupt spinlock acquisition from the code.


Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

“Vered Zvi” wrote in message news:xxxxx@ntdev…
> Hello,
>
> I want to answer an IOCTL request from an ISR DPC.
>
> This is the code I’m using:
>
>
>
> VOID PLxEvtInterruptDpc(
> IN WDFINTERRUPT Interrupt,
> IN WDFDEVICE Device
> )
>
> NTSTATUS status;
> PDEVICE_EXTENSION devExt;
> WDF_REQUEST_PARAMETERS params;
> WDFREQUEST tagRequest;
>
> WdfInterruptAcquireLock( Interrupt );
>
> WDF_REQUEST_PARAMETERS_INIT(&params);
> status = WdfIoQueueFindRequest(devExt->IoControlQueue,
> NULL,
> NULL,
> &params,
> &tagRequest);
>
> … Check is the request is an IOCTL one …
>
> WdfInterruptReleaseLock( Interrupt );
> }
>

>
> Prefast gives the following warning:
>
> The function ‘WdfIoQueueFindRequest’ is not permitted to be called at
> the current IRQ level. The current level is too high: IRQL was last set
> to 3 at line 177. The level might have been inferred from the function
> signature.
> Found in function ‘PLxEvtInterruptDpc’
>
>
> This also matched the WDF documentation.
>
> How can I call ‘WdfIoQueueFindRequest’ within an ISR DPC ?
> The reason I’m doing it is that I want to call DeviceIoControl in the
> user level to find out if an interrupt arrived and to answer this
> request in ISR DPC.
>
> When I ignored the warninig and installed the driver I got blue dump.
>
> Thanks.
>
>
>
> The information contained in this communication is proprietary to Israel
Aerospace Industries Ltd., ELTA Systems Ltd.
> and/or third parties, may contain classified or privileged information, and
is intended only for
> the use of the intended addressee thereof. If you are not the intended
addressee, please be aware
> that any use, disclosure, distribution and/or copying of this communication
is strictly prohibited.
> If you receive this communication in error, please notify the sender
immediately and delete it from
> your computer. Thank you.
>
>
> This message is processed by the PrivaWall Email Security Server.
>
>
>

The basic issue is why you are acquiring the interrupt spin lock to serialize access to this queue? Do you access this queue from your ISR??

Peter
OSR