|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mm: Fix operator associativity bug in mm-locks.h
# HG changeset patch
# User Tim Deegan <tim@xxxxxxx>
# Date 1326386345 0
# Node ID 80765dec9616de06027a18e5ad7d43017c70e7dd
# Parent 50743407a526debba7d7b3be3f1dd27bf62d72d6
x86/mm: Fix operator associativity bug in mm-locks.h
In an order-enforcing wrapper for an "external" recursive lock,
we aim to increment/decrement a recurse count and only update the
lock ordering on zero counts.
Unfortunately we incrementing/decrementing the pointer to the
recurse count, rather than the count itself.
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---
diff -r 50743407a526 -r 80765dec9616 xen/arch/x86/mm/mm-locks.h
--- a/xen/arch/x86/mm/mm-locks.h Thu Jan 12 16:46:54 2012 +0100
+++ b/xen/arch/x86/mm/mm-locks.h Thu Jan 12 16:39:05 2012 +0000
@@ -81,7 +81,7 @@
{
if ( recurse_count )
{
- if ( *recurse_count++ == 0 )
+ if ( (*recurse_count)++ == 0 )
{
*unlock_level = __get_lock_level();
}
@@ -125,7 +125,7 @@
if ( recurse_count )
{
BUG_ON(*recurse_count == 0);
- if ( *recurse_count-- == 1 )
+ if ( (*recurse_count)-- == 1 )
{
__set_lock_level(unlock_level);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |