Any problem of releasing a mutex which is not acquired?

Got a verifier error on this issue. Will this cause a BSOD?

Thanks.

Yes, here’s an excerpt from the DDK:

KeReleaseMutex

A mutex object can be released only by the thread currently holding the
mutex. If an attempt is made to release a mutex not held by the thread, a
bug check occurs. An attempt to release a mutex object whose current state
is signaled also causes a bug check to occur.

Ron

From: xxxxx@ybwork.com
Reply-To: “Windows System Software Devs Interest List”

>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Any problem of releasing a mutex which is not acquired?
>Date: Thu, 4 Jan 2007 23:10:33 -0500 (EST)
>
>Got a verifier error on this issue. Will this cause a BSOD?
>
>Thanks.
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Get live scores and news about your team: Add the Live.com Football Page
www.live.com/?addtemplate=football&icid=T001MSN30A0701

Thanks.

Just found a kernel STL form Compuware’s DriverWorks which acquires mutex without checking its status and release it. I’ve used it for a long time and did not notice it.

Consider abandoning ship. KMDF is far more reliable.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-274861-
xxxxx@lists.osr.com] On Behalf Of xxxxx@ybwork.com
Sent: Sunday, January 07, 2007 5:12 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Any problem of releasing a mutex which is not
acquired?

Thanks.

Just found a kernel STL form Compuware’s DriverWorks which acquires
mutex without checking its status and release it. I’ve used it for a
long time and did not notice it.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Hallelujah!!!

And has thousands of fewer hits in PreFast.


The personal opinion of
Gary G. Little

“Mark Roddy” wrote in message news:xxxxx@ntdev…
> Consider abandoning ship. KMDF is far more reliable.
>
>> -----Original Message-----
>> From: xxxxx@lists.osr.com [mailto:bounce-274861-
>> xxxxx@lists.osr.com] On Behalf Of xxxxx@ybwork.com
>> Sent: Sunday, January 07, 2007 5:12 PM
>> To: Windows System Software Devs Interest List
>> Subject: RE:[ntdev] Any problem of releasing a mutex which is not
>> acquired?
>>
>> Thanks.
>>
>> Just found a kernel STL form Compuware’s DriverWorks which acquires
>> mutex without checking its status and release it. I’ve used it for a
>> long time and did not notice it.
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
>> http://www.osronline.com/article.cfm?id=256
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>
>

Thanks all you guys. Unfortunately, someone in my company really loves CPP and STL…although I love pure DDK more… :slight_smile: