arm64: fix possible invalid FPSIMD initialization state
authorJiang Liu <jiang.liu@huawei.com>
Fri, 27 Sep 2013 08:04:41 +0000 (09:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2014 20:24:26 +0000 (12:24 -0800)
commit2bf5861acf602fe6201ac1f82955ac7283e56b6f
treea9ce744c6ef2bd2b42ac4a54d712e4f2fe6e22f1
parent79f783f05539479676406d3d42c3d86bd203f083
arm64: fix possible invalid FPSIMD initialization state

commit 6db83cea1c975b9a102e17def7d2795814e1ae2b upstream.

If context switching happens during executing fpsimd_flush_thread(),
stale value in FPSIMD registers will be saved into current thread's
fpsimd_state by fpsimd_thread_switch(). That may cause invalid
initialization state for the new process, so disable preemption
when executing fpsimd_flush_thread().

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/fpsimd.c