Commit 8e504a5a authored by Huacai Chen's avatar Huacai Chen Committed by Greg Kroah-Hartman
Browse files

LoongArch: Save LBT before FPU in setup_sigcontext()



[ Upstream commit 112ca94f ]

Now if preemption happens between protected_save_fpu_context() and
protected_save_lbt_context(), FTOP context is lost. Because FTOP is
saved by protected_save_lbt_context() but protected_save_fpu_context()
disables TM before that. So save LBT before FPU in setup_sigcontext()
to avoid this potential risk.

Signed-off-by: default avatarHanlu Li <lihanlu@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8446ff5a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment