From: Andi Kleen Date: Thu, 7 Dec 2006 01:14:05 +0000 (+0100) Subject: [PATCH] Generic: Move __user cast into probe_kernel_address X-Git-Tag: v2.6.20-rc1~145^2^2~8^2~99 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2fff0a48416af891dce38fd425246e337831e0bb;p=linux-2.6-omap-h63xx.git [PATCH] Generic: Move __user cast into probe_kernel_address Caller of probe_kernel_address shouldn't need to know that pka is internally implemented with __get_user. So move the __user cast into pka. Signed-off-by: Andi Kleen --- diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index a48d7f11c7b..65a68da8bd5 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -36,7 +36,7 @@ static inline unsigned long __copy_from_user_nocache(void *to, long ret; \ \ inc_preempt_count(); \ - ret = __get_user(retval, addr); \ + ret = __get_user(retval, (__force typeof(*addr) __user *)addr);\ dec_preempt_count(); \ ret; \ })