WSL2-Linux-Kernel/kernel/rcu
Paul E. McKenney 7ce75b3c84 rcutorture: Fix rcu_torture_fwd_cb_cr() data race
[ Upstream commit 6040072f4774a575fa67b912efe7722874be337b ]

On powerpc systems, spinlock acquisition does not order prior stores
against later loads.  This means that this statement:

	rfcp->rfc_next = NULL;

Can be reordered to follow this statement:

	WRITE_ONCE(*rfcpp, rfcp);

Which is then a data race with rcu_torture_fwd_prog_cr(), specifically,
this statement:

	rfcpn = READ_ONCE(rfcp->rfc_next)

KCSAN located this data race, which represents a real failure on powerpc.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Acked-by: Marco Elver <elver@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: <kasan-dev@googlegroups.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:36 +02:00
..
Kconfig rcu: Make TASKS_RUDE_RCU select IRQ_WORK 2022-06-09 10:22:32 +02:00
Kconfig.debug rcu: Restrict RCU_STRICT_GRACE_PERIOD to at most four CPUs 2021-05-10 16:22:54 -07:00
Makefile rcuperf: Change rcuperf to rcuscale 2020-08-24 18:39:24 -07:00
rcu.h Merge branches 'bitmaprange.2021.05.10c', 'doc.2021.05.10c', 'fixes.2021.05.13a', 'kvfree_rcu.2021.05.10c', 'mmdumpobj.2021.05.10c', 'nocb.2021.05.12a', 'srcu.2021.05.12a', 'tasks.2021.05.18a' and 'torture.2021.05.10c' into HEAD 2021-05-18 10:56:19 -07:00
rcu_segcblist.c rcu/nocb: Remove stale comment above rcu_segcblist_offload() 2021-03-15 13:54:54 -07:00
rcu_segcblist.h rcu: Mark writes to the rcu_segcblist structure's ->flags field 2022-04-08 14:23:55 +02:00
rcuscale.c rcuscale: Move rcu_scale_writer() schedule_timeout_uninterruptible() to _idle() 2023-09-23 11:09:55 +02:00
rcutorture.c rcutorture: Fix rcu_torture_fwd_cb_cr() data race 2024-08-19 05:45:36 +02:00
refscale.c refscale: Fix uninitalized use of wait_queue_head_t 2023-09-19 12:22:31 +02:00
srcutiny.c srcutiny: Mark read-side data races 2021-08-06 13:41:48 -07:00
srcutree.c Merge branches 'bitmaprange.2021.05.10c', 'doc.2021.05.10c', 'fixes.2021.05.13a', 'kvfree_rcu.2021.05.10c', 'mmdumpobj.2021.05.10c', 'nocb.2021.05.12a', 'srcu.2021.05.12a', 'tasks.2021.05.18a' and 'torture.2021.05.10c' into HEAD 2021-05-18 10:56:19 -07:00
sync.c rcu: Fix various typos in comments 2021-05-12 12:11:05 -07:00
tasks.h rcu-tasks: Provide rcu_trace_implies_rcu_gp() 2024-03-26 18:21:11 -04:00
tiny.c srcu: Initialize SRCU after timers 2021-05-10 16:03:35 -07:00
tree.c rcu: kmemleak: Ignore kmemleak false positives when RCU-freeing objects 2023-11-28 16:56:29 +00:00
tree.h rcu/tree: Defer setting of jiffies during stall reset 2023-11-28 16:56:29 +00:00
tree_exp.h rcu: Prevent expedited GP from enabling tick on offline CPU 2023-09-02 09:17:07 +02:00
tree_nocb.h rcu/nocb: Start moving nocb code to its own plugin file 2021-07-20 13:41:51 -07:00
tree_plugin.h rcu: Avoid tracing a few functions executed in stop machine 2023-12-08 08:48:02 +01:00
tree_stall.h rcu/tree: Defer setting of jiffies during stall reset 2023-11-28 16:56:29 +00:00
update.c Merge branches 'bitmaprange.2021.05.10c', 'doc.2021.05.10c', 'fixes.2021.05.13a', 'kvfree_rcu.2021.05.10c', 'mmdumpobj.2021.05.10c', 'nocb.2021.05.12a', 'srcu.2021.05.12a', 'tasks.2021.05.18a' and 'torture.2021.05.10c' into HEAD 2021-05-18 10:56:19 -07:00