Don't support unload. You are patching system apis and you want to be
unloadable?
=====================
Mark Roddy
-----Original Message-----
From: Ceri Coburn [mailto:xxxxx@first4internet.co.uk]
Sent: Friday, August 20, 2004 10:02 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
problem
I have found the problem, and it wasn't in the DriverUnload. The driver I
have created is not necessary a proper windows driver, it's an API spy which
patched the KeServiceDescriptorTable.
In each patched API function I have a
IoAquireRemoveLock/IoReleaseRemoveLock pair to prevent the driver being
removed whilst a patched API call is in progress. Now the problem I have is
that in my Unload I then have IoReleaseRemoveLockAndWait. And sometime what
happens is that the last IoReleaseRemoveLock is called and then switched to
the unload function and IoReleaseRemoveLockAndWait finished and the driver
unloads, but after switching back the patched API function still has the
epilog code to execute and because the driver has been unloaded I get the
error.
Any ideas on how to combat this?
Thanks
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: 20 August 2004 14:51
To: Windows System Software Devs Interest List
Subject: RE: [ntdev]
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS problem
Did you do something in your unload routine that might drop the reference
count on the driver object to zero like ObDerferenceObject it, or delete a
device object (though that should be guarded by NTIO) while you still had
outstanding I/O requests?
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ceri Coburn
Sent: Friday, August 20, 2004 1:35 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
problem
Hi,
I have a problem where on the Driver Unload routine I get a
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS bug check. The weird
thing about this is that the faulting IP is within DriverExit (my driver
unload routine), why would I get this in the driver unload routine
considering the driver unload routine hasn't completed yet?
Details below:-
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS (ce) A driver unloaded
without cancelling timers, DPCs, worker threads, etc.
The broken driver's name is displayed on the screen.
Arguments:
Arg1: f7b13fdb, memory referenced
Arg2: 00000000, value 0 = read operation, 1 = write operation
Arg3: f7b13fdb, If non-zero, the instruction address which referenced the
bad memory address.
Arg4: 00000000, Mm internal code.
Debugging Details:
READ_ADDRESS: f7b13fdb Nonpaged pool
FAULTING_IP:
aries+fdb
f7b13fdb ??
Relevant section in map file:-
0001:00000fd4 _DriverExit@4 000112d4 f driver.obj
0001:00001010 _DriverEntry@8 00011310 f driver.obj
Thanks in advance,
Ceri
This email has been scanned by the MessageLabs Email Security System.
For more information please visit Symantec™ Email Security | Enterprise Messaging Security
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
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
This email has been scanned by the MessageLabs Email Security System.
For more information please visit Symantec™ Email Security | Enterprise Messaging Security
This email has been scanned by the MessageLabs Email Security System.
For more information please visit Symantec™ Email Security | Enterprise Messaging Security
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