HIde a bug in UDFQueueDelayedClose() by removing the boolean storing the fact
that VCB resource was (or not) acquired.
If you debug it, you see that in finally block, value is set to false on exit
without any reason: it is always acquired!
Given it's always acquired, just drop the boolean, but this doesn't explain the
root cause of this bug....

Here it helps avoiding deadlocks on directory listing on a DVD formatted with UDF

CORE-4375

svn path=/trunk/; revision=74780
This commit is contained in:
Pierre Schweitzer 2017-06-03 18:12:25 +00:00
parent 61e603ee5a
commit bcd5f02d0f

View file

@ -1109,7 +1109,6 @@ UDFQueueDelayedClose(
{
PtrUDFIrpContextLite IrpContextLite;
BOOLEAN StartWorker = FALSE;
BOOLEAN AcquiredVcb = FALSE;
NTSTATUS RC;
AdPrint((" UDFQueueDelayedClose\n"));
@ -1119,7 +1118,6 @@ UDFQueueDelayedClose(
UDFAcquireResourceExclusive(&(UDFGlobalData.DelayedCloseResource), TRUE);
UDFAcquireResourceShared(&(Fcb->Vcb->VCBResource), TRUE);
AcquiredVcb = TRUE;
if(Fcb->FCBFlags & UDF_FCB_DELETE_ON_CLOSE) {
try_return(RC = STATUS_DELETE_PENDING);
@ -1183,9 +1181,7 @@ try_exit: NOTHING;
if(!NT_SUCCESS(RC)) {
Fcb->FCBFlags &= ~UDF_FCB_DELAY_CLOSE;
}
if(AcquiredVcb) {
UDFReleaseResource(&(Fcb->Vcb->VCBResource));
}
UDFReleaseResource(&(Fcb->Vcb->VCBResource));
// Release DelayedCloseResource
UDFReleaseResource(&(UDFGlobalData.DelayedCloseResource));
} _SEH2_END;