This is a note to let you know that I've just added the patch titled s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e3f360db08d55a14112bd27454e616a24296a8b0 Mon Sep 17 00:00:00 2001 From: Heiko Carstens <hca@xxxxxxxxxxxxx> Date: Mon, 9 Jan 2023 11:51:20 +0100 Subject: s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() From: Heiko Carstens <hca@xxxxxxxxxxxxx> commit e3f360db08d55a14112bd27454e616a24296a8b0 upstream. Make sure that *ptr__ within arch_this_cpu_to_op_simple() is only dereferenced once by using READ_ONCE(). Otherwise the compiler could generate incorrect code. Cc: <stable@xxxxxxxxxxxxxxx> Reviewed-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx> Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/s390/include/asm/percpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/include/asm/percpu.h +++ b/arch/s390/include/asm/percpu.h @@ -31,7 +31,7 @@ pcp_op_T__ *ptr__; \ preempt_disable_notrace(); \ ptr__ = raw_cpu_ptr(&(pcp)); \ - prev__ = *ptr__; \ + prev__ = READ_ONCE(*ptr__); \ do { \ old__ = prev__; \ new__ = old__ op (val); \ Patches currently in stable-queue which might be from hca@xxxxxxxxxxxxx are queue-6.1/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch queue-6.1/s390-kexec-fix-ipl-report-address-for-kdump.patch queue-6.1/s390-cpum_sf-add-read_once-semantics-to-compare-and-swap-loops.patch