Skip to content

Commit e5bf9a4

Browse files
committed
riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu()
The atomic cpumask_assign_cpu() follows non-atomic cpumask_setall(), which makes the whole operation non-atomic. Fix this by relaxing to non-atomic __assign_cpu(). Fixes: 7c1e5b9 ("riscv: Disable preemption while handling PR_RISCV_CTX_SW_FENCEI_OFF") Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
1 parent 4923c2c commit e5bf9a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/mm/cacheflush.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static void set_icache_stale_mask(void)
172172
stale_cpu = cpumask_test_cpu(cpu, mask);
173173

174174
cpumask_setall(mask);
175-
cpumask_assign_cpu(cpu, mask, stale_cpu);
175+
__assign_cpu(cpu, mask, stale_cpu);
176176
put_cpu();
177177
}
178178
#endif

0 commit comments

Comments
 (0)