microblaze: fix get_user/put_user side-effects
commit538722ca3b762023ac65cec214901a1ebff8b575
authorSteven J. Magnani <steve@digidescorp.com>
Thu, 6 May 2010 21:38:33 +0000 (6 16:38 -0500)
committerMichal Simek <monstr@monstr.eu>
Thu, 13 May 2010 07:21:14 +0000 (13 09:21 +0200)
tree5d4ca0048a9351744fcfa6b5ca2cc25e090882f6
parent0d5961b7f612f8f54fd6fbe1942cdfb141cddfb9
microblaze: fix get_user/put_user side-effects

The Microblaze implementations of get_user() and (MMU) put_user() evaluate
the address argument more than once. This causes unexpected side-effects for
invocations that include increment operators, i.e. get_user(foo, bar++).

This patch also removes the distinction between MMU and noMMU put_user().

Without the patch:
  $ echo 1234567890 > /proc/sys/kernel/core_pattern
  $ cat /proc/sys/kernel/core_pattern
  12345

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
arch/microblaze/include/asm/uaccess.h