diff options
| author | Jakub Kicinski <[email protected]> | 2025-03-24 22:45:33 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-25 17:06:49 +0000 |
| commit | b52458652eca5a551ddb55605201b136f091b04d (patch) | |
| tree | f3a934ee1001a31e62f38e7cef6c014efa7f6f56 /net/core/dev.c | |
| parent | net: designate queue -> napi linking as "ops protected" (diff) | |
| download | kernel-b52458652eca5a551ddb55605201b136f091b04d.tar.gz kernel-b52458652eca5a551ddb55605201b136f091b04d.zip | |
net: protect rxq->mp_params with the instance lock
Ensure that all accesses to mp_params are under the netdev
instance lock. The only change we need is to move
dev_memory_provider_uninstall() under the lock.
Appropriately swap the asserts.
Reviewed-by: Mina Almasry <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index ab74e1f005d2..b597cc27a115 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -10358,7 +10358,7 @@ u32 dev_get_min_mp_channel_count(const struct net_device *dev) { int i; - ASSERT_RTNL(); + netdev_ops_assert_locked(dev); for (i = dev->real_num_rx_queues - 1; i >= 0; i--) if (dev->_rx[i].mp_params.mp_priv) @@ -11962,9 +11962,9 @@ void unregister_netdevice_many_notify(struct list_head *head, dev_tcx_uninstall(dev); netdev_lock_ops(dev); dev_xdp_uninstall(dev); + dev_memory_provider_uninstall(dev); netdev_unlock_ops(dev); bpf_dev_bound_netdev_unregister(dev); - dev_memory_provider_uninstall(dev); netdev_offload_xstats_disable_all(dev); |
