verifier error

Hi,
I was testing my driver with the verifier and it bug checked with the
following error:

DRIVER_VERIFIER_DETECTED_VIOLATION (c4)
A device driver attempting to corrupt the system has been caught. This is
because the driver was specified in the registry as being suspect (by the
administrator) and the kernel has enabled substantial checking of this
driver.
If the driver attempts to corrupt the system, bugchecks 0xC4, 0xC1 and 0xA
will
be among the most commonly seen crashes.
Parameter 1 = 0x1000 … 0x1020 - deadlock verifier error codes.
Typically the
code is 0x1001 (deadlock detected) and you can issue a
`!deadlock’ KD command to get more information.
Arguments:
Arg1: 00000038, a resource is being released but APCs are not disabled.
Arg2: 00000000, current IRQL,
Arg3: 00000000, thread APC disable count,
Arg4: bc1cdfc8, resource.
I was using ExReleaseResource for releasing a ERESOURCE and it was working
fine, until now.
Did anyone encountered this error? any pointers on how to correct this one
…?

regards,
chaitanya


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

When you use resources you must disable regular kernel APC delivery to
eliminate the possibility that your code will introduce a deadlock (because
of an APC being executed.) You do this by doing a KeEnterCriticalRegion
before you acquire the ERESOURCE and a KeLeaveCriticalRegion after you
release it.

Do NOT try to “work around” this problem by disabling APCs only when you
acquire or release the ERESOURCE. This may work (for now) but I believe
this “loophole” has been closed in XP. Also, this “work around” leaves the
original bug the verifier is attempting to detect in place.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: Chaitanya Kancherla [mailto:xxxxx@citrix.com]
Sent: Monday, August 20, 2001 12:31 PM
To: NT Developers Interest List
Subject: [ntdev] verifier error

Hi,
I was testing my driver with the verifier and it bug checked with the
following error:

DRIVER_VERIFIER_DETECTED_VIOLATION (c4)
A device driver attempting to corrupt the system has been caught. This is
because the driver was specified in the registry as being suspect (by the
administrator) and the kernel has enabled substantial checking of this
driver.
If the driver attempts to corrupt the system, bugchecks 0xC4, 0xC1 and 0xA
will
be among the most commonly seen crashes.
Parameter 1 = 0x1000 … 0x1020 - deadlock verifier error codes.
Typically the
code is 0x1001 (deadlock detected) and you can issue a
`!deadlock’ KD command to get more information.
Arguments:
Arg1: 00000038, a resource is being released but APCs are not disabled.
Arg2: 00000000, current IRQL,
Arg3: 00000000, thread APC disable count,
Arg4: bc1cdfc8, resource.
I was using ExReleaseResource for releasing a ERESOURCE and it was working
fine, until now.
Did anyone encountered this error? any pointers on how to correct this one
…?

regards,
chaitanya


You are currently subscribed to ntdev as: xxxxx@osr.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com