Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page
- From: Peter <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 7 May 2006 04:44:01 -0700
All what details I wrote in previous message I have from "!analyze -v",
and from searching stack.
Code crashes inside of: NdisMIndicateReceivePacket(),
In my case this function is called from IRQL==DISPATCH_LEVEL.
I dont access directly or undirectly NDIS_BUFFERS in my code before crash .
This bug is not reproducable, I met it only once.
How is in principle possible that:
NDIS_PACKET with NDIS_BUFFER inside it are created
only with help of documented functions and in memory system stress
MappedSystemVa is paged ?
How can I to avoid this ?
Peter
"Stephan Wolf [MVP]" wrote:
First, please do not make any assumptions on the format of an.
NDIS_BUFFER, even if it is currently an MDL in NT-based Windows.
Second, if you need to access the virtual buffer of an NDIS_BUFFER you
should use NdisQueryBufferSafe() to get the virtual buffer address.
NdisQueryBufferSafe() will take care of locking any related pages if
necessary.
Third, try the "!analyze -v" debugger command to get a more detailed
description (including a stack trace) of the bugcheck.
Also try and enable NDIS debug tracing, see
"NDIS Driver Debugging Guidelines"
http://www.microsoft.com/whdc/device/network/NDIS/ndisdebug.mspx
"How to enable NDIS debug tracing"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q164459
"INFO: NDIS Debug Tracing and Kernel Debugger Extensions"
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q248413
Stephan
---
Peter wrote:
I met bug:
DRIVER_IRQL_NOT_LESS_OR_EQUAL,
Bug occurred inside of: NdisMIndicateReceivePacket(...,myPacket, 1);
called from my driver.
Amazing is that address of memory referenced is inside of NDIS_PACKET:
MyPacket->Head->MappedSystemVa.
I see in memory in debugger that MappedSystemVa is not displayable ant it
show error ERROR_READ_FAULT, so it is probably paged.
I met this bug in system with debug versions of kernel,hal and ndis.sys
and on system running under memory stress with driver verifier turned on my
driver and ndis.sys.
MyPacket was allocated with NdisDprAllocatePacket() and buffers are created
by copying from original packet with help of NdisCopyBuffer().
How can be possible that packet created by such way has paged
Head->MappedSystemVa ?
What can I to do in my code to avoid of this ?
Peter
- Follow-Ups:
- Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page
- From: Steve Dispensa
- Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page
- References:
- Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
- From: Stephan Wolf [MVP]
- Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
- Prev by Date: Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
- Next by Date: Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
- Previous by thread: Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is pageable
- Next by thread: Re: How is possible that NDIS_PACKET->Head->MappedSystemVa is page
- Index(es):
Relevant Pages
|