[PATCH] arm64: fix missing include in asm uaccess.h

Al Viro viro at zeniv.linux.org.uk
Tue Nov 10 19:58:26 EST 2020


On Wed, Nov 11, 2020 at 01:44:38AM +0100, Ansuel Smith wrote:
> Fix a compilation error as PF_KTHREAD is defined in linux/sched.h and
> this is missing.
> 
> Fixes: df325e05a682 ("arm64: Validate tagged addresses in access_ok()
> called from kernel threads")
> Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
> ---
>  arch/arm64/include/asm/uaccess.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/uaccess.h b/arch/arm64/include/asm/uaccess.h
> index 991dd5f031e4..51a4f63f464a 100644
> --- a/arch/arm64/include/asm/uaccess.h
> +++ b/arch/arm64/include/asm/uaccess.h
> @@ -7,6 +7,8 @@
>  #ifndef __ASM_UACCESS_H
>  #define __ASM_UACCESS_H
>  
> +#include <linux/sched.h>
> +
>  #include <asm/alternative.h>
>  #include <asm/kernel-pgtable.h>
>  #include <asm/sysreg.h>

NAK.  The real bug is in arch/arm64/include/asm/asm-prototypes.h -
it has no business pulling asm/uaccess.h

Just include linux/uaccess.h instead.



More information about the linux-arm-kernel mailing list