From: Ville Syrjälä Date: Tue, 12 Sep 2017 16:40:00 +0000 (+0300) Subject: x86: Don't cast away the __user in __get_user_asm_u64() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5ac751d9e6b187c4a0000879d6598eb2292db949;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git x86: Don't cast away the __user in __get_user_asm_u64() Don't cast away the __user in __get_user_asm_u64() on x86-32. Prevents sparse getting upset. Signed-off-by: Ville Syrjälä Signed-off-by: Thomas Gleixner Cc: Benjamin LaHaise Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20170912164000.13745-1-ville.syrjala@linux.intel.com --- diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index 78e8fcc87d4c..4b892917edeb 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -337,7 +337,7 @@ do { \ _ASM_EXTABLE(1b, 4b) \ _ASM_EXTABLE(2b, 4b) \ : "=r" (retval), "=&A"(x) \ - : "m" (__m(__ptr)), "m" __m(((u32 *)(__ptr)) + 1), \ + : "m" (__m(__ptr)), "m" __m(((u32 __user *)(__ptr)) + 1), \ "i" (errret), "0" (retval)); \ })