Commit 464d2428 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Greg Kroah-Hartman
Browse files

rcutorture: Fix rcu_torture_fwd_cb_cr() data race



[ Upstream commit 6040072f ]

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: default avatarPaul E. McKenney <paulmck@kernel.org>
Acked-by: default avatarMarco Elver <elver@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: <kasan-dev@googlegroups.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent adc491f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment