s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 9 Jan 2023 10:51:20 +0000 (11:51 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 11 Jan 2023 14:28:47 +0000 (15:28 +0100)
commite3f360db08d55a14112bd27454e616a24296a8b0
treee876ff0fc1b7ebbf50795332a5550737b52ad4bc
parent82d3edb50a11bf3c5ef63294d5358ba230181413
s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()

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@vger.kernel.org>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/percpu.h