Don't use the OldIrql value from fmutex after releasing it.

svn path=/trunk/; revision=19641
This commit is contained in:
Hartmut Birr 2005-11-26 16:35:23 +00:00
parent 6a8246e478
commit 405f0b60f1
2 changed files with 7 additions and 2 deletions

View file

@ -56,8 +56,11 @@ VOID
FASTCALL
ExReleaseFastMutex(PFAST_MUTEX FastMutex)
{
KIRQL OldIrql;
/* Erase the owner */
FastMutex->Owner = (PVOID)1;
OldIrql = FastMutex->OldIrql;
/* Increase the count */
if (InterlockedIncrement(&FastMutex->Count) <= 0)
@ -67,7 +70,7 @@ ExReleaseFastMutex(PFAST_MUTEX FastMutex)
}
/* Lower IRQL back */
KfLowerIrql(FastMutex->OldIrql);
KfLowerIrql(OldIrql);
}
BOOLEAN

View file

@ -106,10 +106,12 @@ VOID
FASTCALL
ExReleaseFastMutex (PFAST_MUTEX FastMutex)
{
KIRQL oldIrql;
ASSERT_IRQL(APC_LEVEL);
/* Erase the owner */
FastMutex->Owner = NULL;
OldIrql = FastMutex->OldIrql;
/* Increase the count */
if (InterlockedIncrement(&FastMutex->Count) <= 0)
@ -119,7 +121,7 @@ ExReleaseFastMutex (PFAST_MUTEX FastMutex)
}
/* Lower IRQL back */
KfLowerIrql(FastMutex->OldIrql);
KfLowerIrql(OldIrql);
}
/*