Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b04ec261 authored by Hirokazu Takata's avatar Hirokazu Takata Committed by Linus Torvalds
Browse files

[PATCH] m32r: __cmpxchg_u32 fix



This patch fixes a bug of include/asm-m32r/system.h:__cmpxchg_u32().

  static __inline__ unsigned long
  __cmpxchg_u32(volatile unsigned int *p, unsigned int old, unsigned int new);

In __cmpxchg_u32(), the "old" value must not be changed to the previous "*p"
value.  But the former code modifies the previous "*p" value.

A deadlock at _atomic_dec_and_lock sometimes happened due to this bug.

Signed-off-by: default avatarHayato Fujiwara <fujiwara@linux-m32r.org>
Signed-off-by: default avatarHirokazu Takata <takata@linux-m32r.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 49d9c81a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment