]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: shaper: drop redundant xa_lock() bracketing
authorJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 18:32:21 +0000 (11:32 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Jun 2026 10:55:23 +0000 (12:55 +0200)
commitf26cddcf2a8a997c6c1e73101160197c3dead435
tree596e9e4f97c9290b100aede256350f20b345162e
parente6d6a68f1d0a023f112a664add8543df0289ebc9
net: shaper: drop redundant xa_lock() bracketing

The shaper insertion and update code takes xa_lock() explicitly.
Paolo explained that the locking was purely to avoid re-taking
the lock in loops. But it may be mis-read as if it was expecting
readers to be fenced off by xa_lock. Readers of XArray are purely
under RCU. Remove explicit taking of xa_lock().

All writers to hierarchy->shapers are serialized by the netdev
instance lock (or run after netdev is made inaccessible to readers).

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20260609183224.1108521-2-kuba@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/shaper/shaper.c