From: Heiko Carstens Date: Thu, 26 May 2011 07:48:25 +0000 (+0200) Subject: [S390] uaccess: turn __access_ok() into a define X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7683f7444875c822f48f03a9f9c8b1b1e98b2ef0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [S390] uaccess: turn __access_ok() into a define Turn __access_ok() into a define and add a __chk_user_ptr() call instead. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/include/asm/uaccess.h b/arch/s390/include/asm/uaccess.h index 2d9ea11f919a..2b23885e81e9 100644 --- a/arch/s390/include/asm/uaccess.h +++ b/arch/s390/include/asm/uaccess.h @@ -49,12 +49,13 @@ #define segment_eq(a,b) ((a).ar4 == (b).ar4) +#define __access_ok(addr, size) \ +({ \ + __chk_user_ptr(addr); \ + 1; \ +}) -static inline int __access_ok(const void __user *addr, unsigned long size) -{ - return 1; -} -#define access_ok(type,addr,size) __access_ok(addr,size) +#define access_ok(type, addr, size) __access_ok(addr, size) /* * The exception table consists of pairs of addresses: the first is the