diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-04-09 17:01:54 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-04-09 17:01:55 -0700 |
commit | f8cb38c32eb1ba14f82226bee1825e67cffe432f (patch) | |
tree | 92629aa80020f1a3c58f50e897987cc12c6c070b /net/core/lock_debug.c | |
parent | 420aabef3ab5fa743afb4d3d391f03ef0e777ca8 (diff) | |
parent | ce7b14947484e6190372f2c3dbfb69aafbc4c0fc (diff) |
Merge branch 'net-depend-on-instance-lock-for-queue-related-netlink-ops'
Jakub Kicinski says:
====================
net: depend on instance lock for queue related netlink ops
netdev-genl used to be protected by rtnl_lock. In previous release
we already switched the queue management ops (for Rx zero-copy) to
the instance lock. This series converts other ops to depend on the
instance lock when possible.
Unfortunately queue related state is hard to lock (unlike NAPI)
as the process of switching the number of queues usually involves
a large reconfiguration of the driver. The reconfig process has
historically been under rtnl_lock, but for drivers which opt into
ops locking it is also under the instance lock. Leverage that
and conditionally take rtnl_lock or instance lock depending
on the device capabilities.
v1: https://lore.kernel.org/20250407190117.16528-1-kuba@kernel.org
====================
Link: https://patch.msgid.link/20250408195956.412733-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/lock_debug.c')
-rw-r--r-- | net/core/lock_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/lock_debug.c b/net/core/lock_debug.c index b7f22dc92a6f..598c443ef2f3 100644 --- a/net/core/lock_debug.c +++ b/net/core/lock_debug.c @@ -20,6 +20,7 @@ int netdev_debug_event(struct notifier_block *nb, unsigned long event, switch (cmd) { case NETDEV_REGISTER: case NETDEV_UP: + case NETDEV_XDP_FEAT_CHANGE: netdev_ops_assert_locked(dev); fallthrough; case NETDEV_DOWN: @@ -58,7 +59,6 @@ int netdev_debug_event(struct notifier_block *nb, unsigned long event, case NETDEV_OFFLOAD_XSTATS_DISABLE: case NETDEV_OFFLOAD_XSTATS_REPORT_USED: case NETDEV_OFFLOAD_XSTATS_REPORT_DELTA: - case NETDEV_XDP_FEAT_CHANGE: ASSERT_RTNL(); break; |