/[packages]/backports/8/kernel/current/SOURCES/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch
ViewVC logotype

Contents of /backports/8/kernel/current/SOURCES/s390-percpu-add-read_once-to-arch_this_cpu_to_op_simple.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1932881 - (show annotations) (download)
Sat Jan 14 11:15:03 2023 UTC (15 months ago) by tmb
File size: 1103 byte(s)
- update to 6.1.6
  * drop merged patches
- add current -stable queue
- Revert "mm/compaction: fix set skip in fast_find_migrateblock"
- wifi: brcmfmac: fix regression for Broadcom PCIe wifi devices


1 From e3f360db08d55a14112bd27454e616a24296a8b0 Mon Sep 17 00:00:00 2001
2 From: Heiko Carstens <hca@linux.ibm.com>
3 Date: Mon, 9 Jan 2023 11:51:20 +0100
4 Subject: s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
5
6 From: Heiko Carstens <hca@linux.ibm.com>
7
8 commit e3f360db08d55a14112bd27454e616a24296a8b0 upstream.
9
10 Make sure that *ptr__ within arch_this_cpu_to_op_simple() is only
11 dereferenced once by using READ_ONCE(). Otherwise the compiler could
12 generate incorrect code.
13
14 Cc: <stable@vger.kernel.org>
15 Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
16 Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
17 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18 ---
19 arch/s390/include/asm/percpu.h | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 --- a/arch/s390/include/asm/percpu.h
23 +++ b/arch/s390/include/asm/percpu.h
24 @@ -31,7 +31,7 @@
25 pcp_op_T__ *ptr__; \
26 preempt_disable_notrace(); \
27 ptr__ = raw_cpu_ptr(&(pcp)); \
28 - prev__ = *ptr__; \
29 + prev__ = READ_ONCE(*ptr__); \
30 do { \
31 old__ = prev__; \
32 new__ = old__ op (val); \

  ViewVC Help
Powered by ViewVC 1.1.30