Doron
Fri Mar 14 11:48:18 CDT 2008
annotate the function which releases the lock to indicate the lock is being
released in this subfunction and pfd should be happy
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:OFD1YWehIHA.1204@TK2MSFTNGP03.phx.gbl...
> >If you know that the PREfast warning is false positive, why do you add
>>code that actually effects execution?
>
> KeReleaseSpinLock marked by !!! was _surely_ never intended to be
> executed, I
> added it _for 3 minutes_ only to test PREfast. Such a binary will never be
> executed.
>
> The actual code is:
>
> KeAcquireSpinLock
> call to my function which releases the spinlock within (and UnlockIrql
> is
> passed via parameter), the function is properly annotated and is also used
> in
> several other places, where all is fine
> IoCompleteRequest
>
> This offended PREfast, so I added - just to check PREfast - the
> KeReleaseSpinLock call just before IoCompleteRequest. Yes, a false
> positive.
>
>>__drv_releasesResource or __drv_releasesResourceGlobal here?
>
> The "my function" mentioned above surely has
> __drv_releasesResource(SpinLock)
> and this worked in other places it is used.
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> maxim@storagecraft.com
>
http://www.storagecraft.com
>