diff options
author | 2023-03-29 18:02:00 +0200 | |
---|---|---|
committer | 2023-05-09 17:26:58 -0700 | |
commit | 5c83cedbaaad6dfe290e50658a204556ac5ac683 (patch) | |
tree | a469152744094c2a5770624c6e48df85791996f7 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Linux 6.4-rc1 (diff) | |
download | wireguard-linux-5c83cedbaaad6dfe290e50658a204556ac5ac683.tar.xz wireguard-linux-5c83cedbaaad6dfe290e50658a204556ac5ac683.zip |
rcu/nocb: Protect lazy shrinker against concurrent (de-)offloading
The shrinker may run concurrently with callbacks (de-)offloading. As
such, calling rcu_nocb_lock() is very dangerous because it does a
conditional locking. The worst outcome is that rcu_nocb_lock() doesn't
lock but rcu_nocb_unlock() eventually unlocks, or the reverse, creating
an imbalance.
Fix this with protecting against (de-)offloading using the barrier mutex.
Although if the barrier mutex is contended, which should be rare, then
step aside so as not to trigger a mutex VS allocation
dependency chain.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions