[PATCH] arm64: neon: Add preemption protection for kernel_neon_busy

2018-07-09 Thread Yandong.Zhao
From: Yandong Zhao Dear Dave, The scenario for this bug is: The A process is sched out when the CPU0 executes the function raw_cpu_read(kernel_neon_busy) and just gets the address of kernel_neon_busy without reading. The B process starts running kernel_neon_begin() on CPU0, and the variable kern

Re: [PATCH] arm64: neon: Add preemption protection for kernel_neon_busy

2018-07-09 Thread Dave Martin
On Mon, Jul 09, 2018 at 04:45:35PM +0800, Yandong.Zhao wrote: > From: Yandong Zhao > > may_use_simd() can be called in any case and access kernel_neon_busy, > for example: BUG_ON(!may_use_simd()). This patch ensures that > migration will not occur during program access to kernel_neon_busy. > >

[PATCH] arm64: neon: Add preemption protection for kernel_neon_busy

2018-07-09 Thread Yandong.Zhao
From: Yandong Zhao may_use_simd() can be called in any case and access kernel_neon_busy, for example: BUG_ON(!may_use_simd()). This patch ensures that migration will not occur during program access to kernel_neon_busy. Signed-off-by: Yandong Zhao --- arch/arm64/include/asm/simd.h | 16 ---