diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2008-07-29 09:16:33 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-29 09:16:33 +0900 |
commit | 6de9c6481d47c6da5f8b81f75a5c24c69c366f37 (patch) | |
tree | b0f9643afdb5a470978ded04a3c5ce492a35a5da /arch/sh/include/asm/uaccess.h | |
parent | d27e0854d5773fffe1a1d475032b715d124325ae (diff) | |
download | blackbird-op-linux-6de9c6481d47c6da5f8b81f75a5c24c69c366f37.tar.gz blackbird-op-linux-6de9c6481d47c6da5f8b81f75a5c24c69c366f37.zip |
sh: Proper __put_user_asm() size mismatch fix.
This fixes up the workaround in 2b4b2bb42137c779ef0084de5df66ff21b4cd86e
and cleans up __put_user_asm() to get the sizing right from the onset.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/uaccess.h')
-rw-r--r-- | arch/sh/include/asm/uaccess.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sh/include/asm/uaccess.h b/arch/sh/include/asm/uaccess.h index 45c2c9b2993d..075848f43b6a 100644 --- a/arch/sh/include/asm/uaccess.h +++ b/arch/sh/include/asm/uaccess.h @@ -77,8 +77,9 @@ struct __large_struct { unsigned long buf[100]; }; ({ \ long __pu_err; \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ + __typeof__(*(ptr)) __pu_val = x; \ __chk_user_ptr(ptr); \ - __put_user_size((x), __pu_addr, (size), __pu_err); \ + __put_user_size(__pu_val, __pu_addr, (size), __pu_err); \ __pu_err; \ }) @@ -86,8 +87,9 @@ struct __large_struct { unsigned long buf[100]; }; ({ \ long __pu_err = -EFAULT; \ __typeof__(*(ptr)) __user *__pu_addr = (ptr); \ + __typeof__(*(ptr)) __pu_val = x; \ if (likely(access_ok(VERIFY_WRITE, __pu_addr, size))) \ - __put_user_size((x), __pu_addr, (size), \ + __put_user_size(__pu_val, __pu_addr, (size), \ __pu_err); \ __pu_err; \ }) |