[PATCH] powerpc/64s/radix: Fix exit lazy tlb mm switch with irqs enabled

Sachin Sant sachinp at linux.ibm.com
Wed Jun 7 18:22:00 AEST 2023



> Reported-by: Sachin Sant <sachinp at linux.ibm.com>
> Link: https://lore.kernel.org/linuxppc-dev/87a5xcgopc.fsf@mail.lhotse/T/#m105488939d0cd9f980978ed2fdeeb89bf731e673
> Fixes: a665eec0a22e1 ("powerpc/64s/radix: Fix mm_cpumask trimming race vs kthread_use_mm")
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
> ---
> This sounds worse than it probably is, radix can likely tolerate an
> interrupt hitting in mm switch, and the active_mm update may not be racy
> in practice either. Still be good to backport it because I'm not 100%
> sure of that.
> 
> This path can be stressed by reducing tlb_mm_cpumask_trim_timer (e.g.,
> to 3).
> 
> Thanks,
> Nick
> 
> arch/powerpc/mm/book3s64/radix_tlb.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
> 
This patch fixes the reported warning.

Ran powerpc selftests (with default value for tlb_mm_cpumask_trim_timer as
well as tlb_mm_cpumask_trim_timer=3 ). No new errors were observed.

Tested-by: Sachin Sant <sachinp at linux.ibm.com>

- Sachin


More information about the Linuxppc-dev mailing list