
From: Ard Biesheuvel <ardb@kernel.org> mainline inclusion from mainline-v5.16-rc1 commit 5443f98fb9e06e765e24f9d894bf028accad8f71 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4Q94A CVE: NA ------------------------------ The CPU field will be moved back into thread_info even when THREAD_INFO_IN_TASK is enabled, so add it back to x86's definition of struct thread_info. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Borislav Petkov <bp@suse.de> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Guan Jing <guanjing6@huawei.com> Reviewed-by: Chen Hui <judy.chenhui@huawei.com> Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> --- arch/x86/include/asm/thread_info.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index e701f29b4881..7a931f95e1ce 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h @@ -56,6 +56,9 @@ struct task_struct; struct thread_info { unsigned long flags; /* low level flags */ u32 status; /* thread synchronous flags */ +#ifdef CONFIG_SMP + u32 cpu; /* current CPU */ +#endif }; #define INIT_THREAD_INFO(tsk) \ -- 2.20.1