rcu/kvfree: Use READ_ONCE() when access to krcp->head
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Fri, 2 Dec 2022 13:18:37 +0000 (14:18 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 4 Jan 2023 01:48:41 +0000 (17:48 -0800)
commit9627456101ec9bb502daae7276e5141f66a9ddd1
treebf8f0fa80512ebd1a522b8d6f7020b806e405e10
parentcc37d52076a91d8391bbd16249a5790a35292b85
rcu/kvfree: Use READ_ONCE() when access to krcp->head

The need_offload_krc() function is now lock-free, which gives the
compiler freedom to load old values from plain C-language loads from
the kfree_rcu_cpu struture's ->head pointer.  This commit therefore
applied READ_ONCE() to these loads.

Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.c