diff options
| author | Paolo Abeni <[email protected]> | 2025-03-13 22:01:29 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-03-13 22:08:11 +0000 |
| commit | 941defcea7e11ad7ff8f0d4856716dd637d757dd (patch) | |
| tree | b189ce7b72cdded5713ba5b410e87c922ce1b4ee /net/core/netpoll.c | |
| parent | Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mel... (diff) | |
| parent | Merge tag 'net-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-941defcea7e11ad7ff8f0d4856716dd637d757dd.tar.gz kernel-941defcea7e11ad7ff8f0d4856716dd637d757dd.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.14-rc6).
Conflicts:
tools/testing/selftests/drivers/net/ping.py
75cc19c8ff89 ("selftests: drv-net: add xdp cases for ping.py")
de94e8697405 ("selftests: drv-net: store addresses in dict indexed by ipver")
https://lore.kernel.org/netdev/[email protected]/
net/core/devmem.c
a70f891e0fa0 ("net: devmem: do not WARN conditionally after netdev_rx_queue_restart()")
1d22d3060b9b ("net: drop rtnl_lock for queue_mgmt operations")
https://lore.kernel.org/netdev/[email protected]/
Adjacent changes:
tools/testing/selftests/net/Makefile
6f50175ccad4 ("selftests: Add IPv6 link-local address generation tests for GRE devices.")
2e5584e0f913 ("selftests/net: expand cmsg_ipv6.sh with ipv4")
drivers/net/ethernet/broadcom/bnxt/bnxt.c
661958552eda ("eth: bnxt: do not use BNXT_VNIC_NTUPLE unconditionally in queue restart logic")
fe96d717d38e ("bnxt_en: Extend queue stop/start for TX rings")
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/netpoll.c')
| -rw-r--r-- | net/core/netpoll.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 8a0df2b274a8..3cc3eae9def3 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -320,6 +320,7 @@ static int netpoll_owner_active(struct net_device *dev) static netdev_tx_t __netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) { netdev_tx_t status = NETDEV_TX_BUSY; + netdev_tx_t ret = NET_XMIT_DROP; struct net_device *dev; unsigned long tries; /* It is up to the caller to keep npinfo alive. */ @@ -328,11 +329,12 @@ static netdev_tx_t __netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) lockdep_assert_irqs_disabled(); dev = np->dev; + rcu_read_lock(); npinfo = rcu_dereference_bh(dev->npinfo); if (!npinfo || !netif_running(dev) || !netif_device_present(dev)) { dev_kfree_skb_irq(skb); - return NET_XMIT_DROP; + goto out; } /* don't get messages out of order, and no recursion */ @@ -371,7 +373,10 @@ static netdev_tx_t __netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) skb_queue_tail(&npinfo->txq, skb); schedule_delayed_work(&npinfo->tx_work,0); } - return NETDEV_TX_OK; + ret = NETDEV_TX_OK; +out: + rcu_read_unlock(); + return ret; } netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) |
