Drivers that do not free allocations are then, by their very nature
unloadable. For example, this applies to physical media file system
drivers because of the shared allocation responsibilities for Vpb
structures (which are allocated by the I/O manager and/or the physical
media file system drivers.)
In general, though, I agree with the consensus opinion here: it is not a
good architecture to allocate in one driver and free in another driver.
While I can point to the Vpb management as an aberration, it is
certainly *not* the norm and should not be an element of a well designed
driver. As several people suggested, you are much better off to build
an interface for allocating buffers so they are always managed within
the context of the same driver. Since this isn’t an onerous task, it
seems it is something you should consider including in your driver.
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Tuesday, December 13, 2005 12:12 AM
To: ntdev redirect
Subject: RE: [ntdev] Driver Verifier - The driver is unloading without
first freeing all its memory pools
DV works by changing the import of ExAllocatePoolXxx to another function
which captures the caller. It does not matter the context in which you
allocate pool, it will be tracked. DV will not be updated to ignore
abandoned allocations on unload.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Jerry Schneider
Sent: Monday, December 12, 2005 4:59 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Driver Verifier - The driver is unloading without
first freeing all its memory pools
Alon wrote:
My questions:
- Is there a real problem or it is just that the
Verifier “can not know” that the memory allocated is
for a device still exists (until system shutdown)
- Is there any way to tell the Driver Verifier to
“acknowledge” specific issues like this
Recently I was discussing a similar question and I
suggested that the driver needing to unload without
freeing allocated memory could use a System Worker
thread to do the allocation, hoping that Verifier
would see the allocation as belonging to System and
thus not a problem.
Has anyone tried this, and does it work (or will work
at least until the next release of DV improves it’s
tracking abilities and begins to catch it)? Inquiring
mind wants to know…
Jerry
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com