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-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fff0a48416af891dce38fd425246e337831e0bb;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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 a48d7f11c7be..65a68da8bd5d 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; \ })