Files
linux/arch/arm64/include/asm
Yandong Zhao 2fd8eb4ad8 arm64: neon: Fix function may_use_simd() return error status
It does not matter if the caller of may_use_simd() migrates to
another cpu after the call, but it is still important that the
kernel_neon_busy percpu instance that is read matches the cpu the
task is running on at the time of the read.

This means that raw_cpu_read() is not sufficient.  kernel_neon_busy
may appear true if the caller migrates during the execution of
raw_cpu_read() and the next task to be scheduled in on the initial
cpu calls kernel_neon_begin().

This patch replaces raw_cpu_read() with this_cpu_read() to protect
against this race.

Cc: <stable@vger.kernel.org>
Fixes: cb84d11e16 ("arm64: neon: Remove support for nested or hardirq kernel-mode NEON")
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Yandong Zhao <yandong77520@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2018-07-11 17:02:02 +01:00
..
2017-08-08 16:28:13 +01:00
2018-06-15 18:10:01 -03:00
2018-05-31 17:34:38 +01:00
2016-09-09 11:41:13 +01:00
2016-11-07 18:15:21 +00:00
2016-03-04 18:19:17 +00:00
2018-05-07 07:15:41 +02:00
2018-06-21 09:14:54 +01:00
2017-04-17 12:52:22 -04:00
2017-04-17 12:52:22 -04:00
2016-11-07 18:15:21 +00:00
2018-01-13 10:45:03 +00:00