* [PATCH] h8300: fix a bug on get_user()
@ 2010-08-26 10:52 Namhyung Kim
0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2010-08-26 10:52 UTC (permalink / raw)
To: Yoshinori Sato; +Cc: linux-kernel
current implementation of get_user() lacks parenthesis when it derefers ptr
so usage like get_user(val, addr + i) had a potential bug. Fix it.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
arch/h8300/include/asm/uaccess.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/h8300/include/asm/uaccess.h b/arch/h8300/include/asm/uaccess.h
index 356068c..b0e5cb9 100644
--- a/arch/h8300/include/asm/uaccess.h
+++ b/arch/h8300/include/asm/uaccess.h
@@ -91,7 +91,7 @@ extern int __put_user_bad(void);
#define get_user(x, ptr) \
({ \
int __gu_err = 0; \
- typeof(*(ptr)) __gu_val = *ptr; \
+ typeof(*(ptr)) __gu_val = *(ptr); \
switch (sizeof(*(ptr))) { \
case 1: \
case 2: \
--
1.7.2.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-26 10:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 10:52 [PATCH] h8300: fix a bug on get_user() Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®