Skip to contentSkip to conversation

h8300: fix a bug on get_user()

PATCH New Namhyung Kim 1 participant 1 message Aug 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 h8300: fix a bug on get_user()

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.

---
 arch/h8300/include/asm/uaccess.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/h8300/include/asm/uaccess.h +1 -1
index 356068c..b0e5cb9 100644
@@ -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:							\
Signature · 1 line
1.7.2.2