mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:02:58 +00:00
Don't use the OldIrql value from fmutex after releasing it.
svn path=/trunk/; revision=19641
This commit is contained in:
parent
6a8246e478
commit
405f0b60f1
2 changed files with 7 additions and 2 deletions
|
@ -56,8 +56,11 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
ExReleaseFastMutex(PFAST_MUTEX FastMutex)
|
ExReleaseFastMutex(PFAST_MUTEX FastMutex)
|
||||||
{
|
{
|
||||||
|
KIRQL OldIrql;
|
||||||
|
|
||||||
/* Erase the owner */
|
/* Erase the owner */
|
||||||
FastMutex->Owner = (PVOID)1;
|
FastMutex->Owner = (PVOID)1;
|
||||||
|
OldIrql = FastMutex->OldIrql;
|
||||||
|
|
||||||
/* Increase the count */
|
/* Increase the count */
|
||||||
if (InterlockedIncrement(&FastMutex->Count) <= 0)
|
if (InterlockedIncrement(&FastMutex->Count) <= 0)
|
||||||
|
@ -67,7 +70,7 @@ ExReleaseFastMutex(PFAST_MUTEX FastMutex)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lower IRQL back */
|
/* Lower IRQL back */
|
||||||
KfLowerIrql(FastMutex->OldIrql);
|
KfLowerIrql(OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
|
|
|
@ -106,10 +106,12 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
ExReleaseFastMutex (PFAST_MUTEX FastMutex)
|
ExReleaseFastMutex (PFAST_MUTEX FastMutex)
|
||||||
{
|
{
|
||||||
|
KIRQL oldIrql;
|
||||||
ASSERT_IRQL(APC_LEVEL);
|
ASSERT_IRQL(APC_LEVEL);
|
||||||
|
|
||||||
/* Erase the owner */
|
/* Erase the owner */
|
||||||
FastMutex->Owner = NULL;
|
FastMutex->Owner = NULL;
|
||||||
|
OldIrql = FastMutex->OldIrql;
|
||||||
|
|
||||||
/* Increase the count */
|
/* Increase the count */
|
||||||
if (InterlockedIncrement(&FastMutex->Count) <= 0)
|
if (InterlockedIncrement(&FastMutex->Count) <= 0)
|
||||||
|
@ -119,7 +121,7 @@ ExReleaseFastMutex (PFAST_MUTEX FastMutex)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Lower IRQL back */
|
/* Lower IRQL back */
|
||||||
KfLowerIrql(FastMutex->OldIrql);
|
KfLowerIrql(OldIrql);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue