Re: WDK 6001: PREfast bug
- From: 0dbell@xxxxxxxxx
- Date: Fri, 14 Mar 2008 07:35:43 -0700 (PDT)
On Mar 14, 7:58 am, "Maxim S. Shatskih" <ma...@xxxxxxxxxxxxxxxx>
wrote:
Here is it. KeReleaseSpinLock was added temporarily to try to get rid of
PREfast warning. Unfortunately, this does not help, and a valid sequence of 2
MS's functions causes a warning:
// !!!
713 KeReleaseSpinLock(&(Disk->SpinLock), Irql);
714 IoCompleteRequest(Irp, IO_NO_INCREMENT);
vsnap.c(714) : warning 28192: No resource of the class 'SpinLock'
can be held when this function is called. 'Disk->SpinLock' is currently held.
If you know that the PREfast warning is false positive, why do you add
code that actually effects execution?
I would think that using a Nonmemory Resource Annotation is
preferrable in such case. For example, can you use
__drv_releasesResource or __drv_releasesResourceGlobal here?
http://msdn2.microsoft.com/en-us/library/cc264096.aspx
Unless, of course, I misunderstood what you wrote.
Don
.
- Follow-Ups:
- Re: WDK 6001: PREfast bug
- From: Maxim S. Shatskih
- Re: WDK 6001: PREfast bug
- References:
- WDK 6001: PREfast bug
- From: Maxim S. Shatskih
- WDK 6001: PREfast bug
- Prev by Date: Re: Problem with USB High Speed Hub
- Next by Date: Re: Capture Dbgview Message From Win32 Applications
- Previous by thread: WDK 6001: PREfast bug
- Next by thread: Re: WDK 6001: PREfast bug
- Index(es):