Hibernation and KeDeregisterProcessorChangeCallback()

I am having a crash after coming out of hibernation and then unloading
my driver. The crash occurs in KeDeregisterProcessorChangeCallback().
I think what is happening is that the handle I got from
KeRegisterProcessorChangeCallback() became stale over the hibernation
period and when I called KeDeregisterProcessorChangeCallback() during
driver unload, the stale handle was invalid and caused the crash.

Any thoughts?

thx

((&->

Handles dont become stale behind your back. Did you verify you are using the same handle value? Did you make sure you didn’t unregister previously and not clear out the handle value?

d

debt from my phone

-----Original Message-----
From: QuasiCodo
Sent: Tuesday, September 13, 2011 10:15 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Hibernation and KeDeregisterProcessorChangeCallback()

I am having a crash after coming out of hibernation and then unloading
my driver. The crash occurs in KeDeregisterProcessorChangeCallback().
I think what is happening is that the handle I got from
KeRegisterProcessorChangeCallback() became stale over the hibernation
period and when I called KeDeregisterProcessorChangeCallback() during
driver unload, the stale handle was invalid and caused the crash.

Any thoughts?

thx

((&->


NTDEV is sponsored by OSR

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

We figured this out. My bad. Don’t call
KeDeregsiterProcessorChangeCallback() with a spinlock held and irql
raised to dispatch.

Doh!

((&->

On 9/13/2011 11:14 AM, QuasiCodo wrote:

I am having a crash after coming out of hibernation and then unloading
my driver. The crash occurs in KeDeregisterProcessorChangeCallback(). I
think what is happening is that the handle I got from
KeRegisterProcessorChangeCallback() became stale over the hibernation
period and when I called KeDeregisterProcessorChangeCallback() during
driver unload, the stale handle was invalid and caused the crash.

Any thoughts?

thx

((&->