Events for Dispatch

Hello All,

Is there anyway to set events using NdisSetEvent in the ProtocolReceiveNbl callback?

The documentation for NdisSetEvent says that it can be called at IRQL<= DISPATCH_LEVEL and ProtocolReceiveNbl runs on IRQL = DISPATCH_LEVEL. But when I try calling NdisSetEvent from the callback it results in a page fault resulting in IRQL_NOT_LESS_OR_EQUAL bug check.

For the NDIS_EVENT structure I have a local memory in the thread calling NdisWaitEvent. Just to try I explicitly used NdisAllocateMemoryWithTagPriority for allocating memory for NDIS_EVENT variable but that also results same.

Any other ways through which we can achieve this?

What irql is the processor running at actually when the bugcheck occurs?

Dave Cattley

Sent from my Windows Phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ‎9/‎15/‎2014 2:35 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Events for Dispatch

Hello All,

Is there anyway to set events using NdisSetEvent in the ProtocolReceiveNbl callback?

The documentation for NdisSetEvent says that it can be called at IRQL<= DISPATCH_LEVEL and ProtocolReceiveNbl runs on IRQL = DISPATCH_LEVEL. But when I try calling NdisSetEvent from the callback it results in a page fault resulting in IRQL_NOT_LESS_OR_EQUAL bug check.

For the NDIS_EVENT structure I have a local memory in the thread calling NdisWaitEvent. Just to try I explicitly used NdisAllocateMemoryWithTagPriority for allocating memory for NDIS_EVENT variable but that also results same.

Any other ways through which we can achieve this?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

NdisSetEvent can certainly be called at DISPATCH_LEVEL as long as the
NDIS_EVENT that it references resides in non-paged memory.

Thomas F. Divine

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Monday, September 15, 2014 2:37 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Events for Dispatch

Hello All,

Is there anyway to set events using NdisSetEvent in the ProtocolReceiveNbl
callback?

The documentation for NdisSetEvent says that it can be called at IRQL<=
DISPATCH_LEVEL and ProtocolReceiveNbl runs on IRQL = DISPATCH_LEVEL. But
when I try calling NdisSetEvent from the callback it results in a page fault
resulting in IRQL_NOT_LESS_OR_EQUAL bug check.

For the NDIS_EVENT structure I have a local memory in the thread calling
NdisWaitEvent. Just to try I explicitly used
NdisAllocateMemoryWithTagPriority for allocating memory for NDIS_EVENT
variable but that also results same.

Any other ways through which we can achieve this?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

It’s irql 2 DISPATCH_LEVEL
On 16-Sep-2014 1:06 am, “Dave Cattley” wrote:

> What irql is the processor running at actually when the bugcheck occurs?
>
> Dave Cattley
>
> Sent from my Windows Phone
> ------------------------------
> From: xxxxx@gmail.com
> Sent: ‎9/‎15/‎2014 2:35 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Events for Dispatch
>
> Hello All,
>
> Is there anyway to set events using NdisSetEvent in the ProtocolReceiveNbl
> callback?
>
> The documentation for NdisSetEvent says that it can be called at IRQL<=
> DISPATCH_LEVEL and ProtocolReceiveNbl runs on IRQL = DISPATCH_LEVEL. But
> when I try calling NdisSetEvent from the callback it results in a page
> fault resulting in IRQL_NOT_LESS_OR_EQUAL bug check.
>
> For the NDIS_EVENT structure I have a local memory in the thread calling
> NdisWaitEvent. Just to try I explicitly used
> NdisAllocateMemoryWithTagPriority for allocating memory for NDIS_EVENT
> variable but that also results same.
>
> Any other ways through which we can achieve this?
>
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

IRQL_NOT_LESS_OR_EQUAL bug check also means the dereferenced pointer points to invalid (unmapped) memory location.
Have you initialized the event? Do you do it only once?

Show the code that’s calling the function.