summaryrefslogtreecommitdiff
path: root/net/core/devmem.c
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@fomichev.me>2025-03-11 17:40:26 +0300
committerJakub Kicinski <kuba@kernel.org>2025-03-12 23:32:35 +0300
commit1d22d3060b9b1f33da617045480c59c4c0511196 (patch)
treeb42e6ccff4ac3e7de770512b6f7463680b621bfa /net/core/devmem.c
parent10eef096be25f3811ada2b43b108d1b8d8170001 (diff)
downloadlinux-1d22d3060b9b1f33da617045480c59c4c0511196.tar.xz
net: drop rtnl_lock for queue_mgmt operations
All drivers that use queue API are already converted to use netdev instance lock. Move netdev instance lock management to the netlink layer and drop rtnl_lock. Signed-off-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Mina Almasry. <almasrymina@google.com> Link: https://patch.msgid.link/20250311144026.4154277-4-sdf@fomichev.me Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/devmem.c')
-rw-r--r--net/core/devmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/devmem.c b/net/core/devmem.c
index 7c6e0b5b6acb..5c4d79a1bcd8 100644
--- a/net/core/devmem.c
+++ b/net/core/devmem.c
@@ -25,7 +25,6 @@
/* Device memory support */
-/* Protected by rtnl_lock() */
static DEFINE_XARRAY_FLAGS(net_devmem_dmabuf_bindings, XA_FLAGS_ALLOC1);
static const struct memory_provider_ops dmabuf_devmem_ops;
@@ -128,9 +127,10 @@ void net_devmem_unbind_dmabuf(struct net_devmem_dmabuf_binding *binding)
rxq->mp_params.mp_priv = NULL;
rxq->mp_params.mp_ops = NULL;
+ netdev_lock(binding->dev);
rxq_idx = get_netdev_rx_queue_index(rxq);
-
WARN_ON(netdev_rx_queue_restart(binding->dev, rxq_idx));
+ netdev_unlock(binding->dev);
}
xa_erase(&net_devmem_dmabuf_bindings, binding->id);