Merge tag 'for-4.4' of git://git.osdn.jp/gitroot/uclinux-h8/linux
Pull h8300 updates from Yoshinori Sato: "Some bug fixes" * tag 'for-4.4' of git://git.osdn.jp/gitroot/uclinux-h8/linux: h8300: enable CLKSRC_OF h8300: Don't set CROSS_COMPILE unconditionally asm-generic: {get,put}_user ptr argument evaluate only 1 time h8300: bit io fix h8300: zImage fix h8300: register address fix h8300: Fix alignment for .data h8300: unaligned divcr register support.
This commit is contained in:
@@ -163,9 +163,10 @@ static inline __must_check long __copy_to_user(void __user *to,
|
||||
|
||||
#define put_user(x, ptr) \
|
||||
({ \
|
||||
void *__p = (ptr); \
|
||||
might_fault(); \
|
||||
access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \
|
||||
__put_user(x, ptr) : \
|
||||
access_ok(VERIFY_WRITE, __p, sizeof(*ptr)) ? \
|
||||
__put_user((x), ((__typeof__(*(ptr)) *)__p)) : \
|
||||
-EFAULT; \
|
||||
})
|
||||
|
||||
@@ -225,9 +226,10 @@ extern int __put_user_bad(void) __attribute__((noreturn));
|
||||
|
||||
#define get_user(x, ptr) \
|
||||
({ \
|
||||
const void *__p = (ptr); \
|
||||
might_fault(); \
|
||||
access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \
|
||||
__get_user(x, ptr) : \
|
||||
access_ok(VERIFY_READ, __p, sizeof(*ptr)) ? \
|
||||
__get_user((x), (__typeof__(*(ptr)) *)__p) : \
|
||||
-EFAULT; \
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user