The attached patch makes the get_user macro cast the source pointer to an
appropriate type for the specified size.
Signed-Off-By: David Howells <[email protected]>
---
warthog>diffstat -p1 frv-uaccess-2615.diff
include/asm-frv/uaccess.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff -uNrp /warthog/kernels/linux-2.6.15/include/asm-frv/uaccess.h linux-2.6.15-frv/include/asm-frv/uaccess.h
--- /warthog/kernels/linux-2.6.15/include/asm-frv/uaccess.h 2005-11-01 13:19:17.000000000 +0000
+++ linux-2.6.15-frv/include/asm-frv/uaccess.h 2006-01-06 14:43:43.000000000 +0000
@@ -180,16 +180,16 @@ do { \
\
switch (sizeof(*(ptr))) { \
case 1: \
- __get_user_asm(__gu_err, __gu_val, ptr, "ub", "=r"); \
+ __get_user_asm(__gu_err, *(u8*)&__gu_val, ptr, "ub", "=r"); \
break; \
case 2: \
- __get_user_asm(__gu_err, __gu_val, ptr, "uh", "=r"); \
+ __get_user_asm(__gu_err, *(u16*)&__gu_val, ptr, "uh", "=r"); \
break; \
case 4: \
- __get_user_asm(__gu_err, __gu_val, ptr, "", "=r"); \
+ __get_user_asm(__gu_err, *(u32*)&__gu_val, ptr, "", "=r"); \
break; \
case 8: \
- __get_user_asm(__gu_err, __gu_val, ptr, "d", "=e"); \
+ __get_user_asm(__gu_err, *(u64*)&__gu_val, ptr, "d", "=e"); \
break; \
default: \
__gu_err = __get_user_bad(); \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]