Skip to content

Commit

Permalink
microblaze: Reversed logic in futex cmpxchg
Browse files Browse the repository at this point in the history
futex_atomic_cmpxchg_inatomic exchanged if the values were
unequal rather than equal. This caused incorrect behavior
of robust futexes.

Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
  • Loading branch information
Meyer, Kirk authored and Michal Simek committed May 27, 2013
1 parent b5dd0bb commit f6a12a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/microblaze/include/asm/futex.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,

__asm__ __volatile__ ("1: lwx %1, %3, r0; \
cmp %2, %1, %4; \
beqi %2, 3f; \
bnei %2, 3f; \
2: swx %5, %3, r0; \
addic %2, r0, 0; \
bnei %2, 1b; \
Expand Down

0 comments on commit f6a12a7

Please sign in to comment.