I have code in my driver like:
isMainResourceAcquired = ExAcquireResourceSharedLite( fcb->Resource, IoIsOperationSynchronous(irp));
…
if (isMainResourceAcquired) ExReleaseResourceLite(fcb->Resource);
Using staticdv to check my driver, I got SharedResourceAccess defect. Traced in SDV Report, I can see that the resource was not acquired, accessState == 1. But the return value of ExAcquireResourceSharedLite() is not 0, isMainResourceAcquired!=0. This is not the same as described in WDK document.
Anybody knows the reason? Or somewhere I missed. While I have no problem with ExclusiveResourceAccess rule. And I checked both slic files, they are the same.
My staticdv version is 1.5.317.0
Thanks in advance.
Hi
Food for tought here. SDV “doesnt work” for file systems and filters
(whatever “doesnt work” means), so AFAIK you a pioneer - well so it’s hat’s
off to you. Well I guess you’re a file system, else perhaps you’d not be
looking at fcb->Resource
Maybe, this is an SDV issue? On your evidence
it looks pretty basic to me, anyway. I think you can find an email address
at msft for sdv issues in the whdc, xxxxx@microtost.com of course, but
cant rememeber the something off top of the head.
Good luck, Lyndon
wrote in message news:xxxxx@ntfsd…
>I have code in my driver like:
>
> isMainResourceAcquired = ExAcquireResourceSharedLite( fcb->Resource,
> IoIsOperationSynchronous(irp));
>
> …
>
> if (isMainResourceAcquired) ExReleaseResourceLite(fcb->Resource);
>
> Using staticdv to check my driver, I got SharedResourceAccess defect.
> Traced in SDV Report, I can see that the resource was not acquired,
> accessState == 1. But the return value of ExAcquireResourceSharedLite() is
> not 0, isMainResourceAcquired!=0. This is not the same as described in WDK
> document.
>
> Anybody knows the reason? Or somewhere I missed. While I have no problem
> with ExclusiveResourceAccess rule. And I checked both slic files, they are
> the same.
>
> My staticdv version is 1.5.317.0
>
> Thanks in advance.
>
>
>
>
>
xxxxx@microsoft.com, if memory from the DDC session last week serves.
-Steve
On 10/6/08 5:27 PM, “Lyndon J Clarke” wrote:
> Hi
>
> Food for tought here. SDV “doesnt work” for file systems and filters
> (whatever “doesnt work” means), so AFAIK you a pioneer - well so it’s hat’s
> off to you. Well I guess you’re a file system, else perhaps you’d not be
> looking at fcb->Resource
Maybe, this is an SDV issue? On your evidence
> it looks pretty basic to me, anyway. I think you can find an email address
> at msft for sdv issues in the whdc, xxxxx@microtost.com of course, but
> cant rememeber the something off top of the head.
>
> Good luck, Lyndon
>
> wrote in message news:xxxxx@ntfsd…
>> I have code in my driver like:
>>
>> isMainResourceAcquired = ExAcquireResourceSharedLite( fcb->Resource,
>> IoIsOperationSynchronous(irp));
>>
>> …
>>
>> if (isMainResourceAcquired) ExReleaseResourceLite(fcb->Resource);
>>
>> Using staticdv to check my driver, I got SharedResourceAccess defect.
>> Traced in SDV Report, I can see that the resource was not acquired,
>> accessState == 1. But the return value of ExAcquireResourceSharedLite() is
>> not 0, isMainResourceAcquired!=0. This is not the same as described in WDK
>> document.
>>
>> Anybody knows the reason? Or somewhere I missed. While I have no problem
>> with ExclusiveResourceAccess rule. And I checked both slic files, they are
>> the same.
>>
>> My staticdv version is 1.5.317.0
>>
>> Thanks in advance.
>>
>>
>>
>>
>>
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> You are currently subscribed to ntfsd as: xxxxx@positivenetworks.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Though SDV is for device driver, I thought some SDV rules, such as IRP, IRQL and Sync rules, should be able to be applied to file systems or filters. At least SDV did help me pin-point several defects in my driver and yes it is a file system driver :).
I just sent a feedback to MS for this issue.
Thank you both,
Ping
Hi Ping,
This is a known issue and good news is it?s actually fixed now in the preview version of the Win7 WDK, and will also ship with the final Win 7 WDK. If you have the this WDK, with SDV version of 2.0.349, the rule should pass.
The preview version of the Win7 WDK will be delivered to DDC and WinHec attendees.
If you have questions on SDV, or want to give any positive\negative feedback, please feel free to email “sdvpfdex” alias @microsoft.com.