]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:01 +0000 (11:42 +0100)
commit8aa878c10f5bd72d3b81a0dcaf7b164fdb70a2aa
treefe77519fd56469770568547748b8280ba14d4f7d
parent39b506122c8b514c8a72ea84ce0e2014366f4b1d
s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()

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