[ros-diffs] [hbirr] 19641: Don't use the OldIrql value from fmutex
after releasing it.
hbirr at svn.reactos.com
hbirr at svn.reactos.com
Sat Nov 26 17:35:35 CET 2005
Don't use the OldIrql value from fmutex after releasing it.
Modified: trunk/reactos/hal/halx86/generic/fmutex.c
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c
_____
Modified: trunk/reactos/hal/halx86/generic/fmutex.c
--- trunk/reactos/hal/halx86/generic/fmutex.c 2005-11-26 16:08:27 UTC
(rev 19640)
+++ trunk/reactos/hal/halx86/generic/fmutex.c 2005-11-26 16:35:23 UTC
(rev 19641)
@@ -56,8 +56,11 @@
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 @@
}
/* Lower IRQL back */
- KfLowerIrql(FastMutex->OldIrql);
+ KfLowerIrql(OldIrql);
}
BOOLEAN
_____
Modified: trunk/reactos/ntoskrnl/ex/fmutex.c
--- trunk/reactos/ntoskrnl/ex/fmutex.c 2005-11-26 16:08:27 UTC (rev
19640)
+++ trunk/reactos/ntoskrnl/ex/fmutex.c 2005-11-26 16:35:23 UTC (rev
19641)
@@ -106,10 +106,12 @@
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 @@
}
/* Lower IRQL back */
- KfLowerIrql(FastMutex->OldIrql);
+ KfLowerIrql(OldIrql);
}
/*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051126/e4fb073b/attachment.html
More information about the Ros-diffs
mailing list