linux/drivers/net
Denis V. Lunev 451c9075d6 qede: sync udp_tunnel ports outside qede_lock in the recovery path
A TX timeout on a qede NIC that has VXLAN/GENEVE tunnel ports
configured wedges the rtnetlink control plane of the whole machine:

  NETDEV WATCHDOG: ens6f1 (qede): transmit queue 2 timed out 10226 ms
  [qede_tx_timeout:586(ens6f1)]TX timeout on queue 2!
  [qede_recovery_handler:2665(ens6f0)]Starting a recovery process

The recovery path deadlocks on the driver's own mutex:

  qede_sp_task
   rtnl_lock()
   mutex_lock(&edev->qede_lock)        <- taken
   qede_recovery_handler
    qede_load
    udp_tunnel_nic_reset_ntf
     __udp_tunnel_nic_device_sync
      info->sync_table == qede_udp_tunnel_sync
       mutex_lock(&edev->qede_lock)    <- same task: deadlock

The mutex is not recursive, so the kworker blocks on itself with
rtnl_lock held, and neither lock is ever released. Every task that
calls rtnl_lock() afterwards (ip, ovs-vswitchd, lldpad, IPv6
addrconf, sshd) blocks forever while the node still answers ping.
In a vmcore from an affected production node rtnl_mutex.owner
decodes to the very kworker blocked at the innermost mutex_lock()
above.

Re-sync the tunnel ports from qede_sp_task() after the internal lock
is dropped, still under rtnl_lock as the udp_tunnel API requires.
This mirrors qede_open(), which calls udp_tunnel_nic_reset_ntf()
under rtnl without the internal lock.

qede_recovery_handler() now returns whether it has successfully
reloaded an open device, and the caller re-syncs the ports only in
that case. This keeps the old gating exactly: a device that was down
or a failed recovery returns false, as those paths never reached the
udp_tunnel_nic_reset_ntf() call before either.

This was the only user of the qede_lock()/qede_unlock() helpers, so
remove them.

Fixes: 8cd160a294 ("qede: convert to new udp_tunnel_nic infra")
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Andrew Lunn <andrew+netdev@lunn.ch>
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20260726104311.1782900-1-den@openvz.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-07-30 15:16:38 +02:00
..
arcnet net: arcnet: com20020-pci: avoid -Wformat-truncation warning 2026-05-22 17:20:57 -07:00
bonding bonding: fix devconf_all NULL dereference when IPv6 is disabled 2026-07-20 18:18:02 -07:00
can can: ems_usb: validate CPC message lengths 2026-07-29 12:00:18 +02:00
dsa net: dsa: realtek: use devm_mutex_init for l2_lock 2026-07-29 18:42:27 -07:00
ethernet qede: sync udp_tunnel ports outside qede_lock in the recovery path 2026-07-30 15:16:38 +02:00
fddi FDDI: defza: Sanitise the reset safety timer 2026-05-13 17:31:01 -07:00
fjes
hyperv hv_netvsc: use kmap_local_page in netvsc_copy_to_send_buf 2026-06-09 13:16:30 +02:00
ieee802154 Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
ipa net: ipa: fix SMEM state handle leaks in SMP2P init 2026-06-26 18:40:04 -07:00
ipvlan ipvlan: use netif_receive_skb() in ipvlan_process_multicast() 2026-05-13 17:55:14 -07:00
mctp mctp: serial: handle zero-length frames to prevent rx buffer overflow 2026-07-23 15:34:00 +02:00
mdio Including fixes from netfilter, Bluetooth and batman-adv. 2026-07-09 08:26:51 -07:00
netdevsim netdevsim: remove ethtool debugfs files before freeing netdev 2026-06-29 18:47:23 -07:00
ovpn ovpn: use monotonic clock for peer keepalive timeouts 2026-07-20 16:29:31 +02:00
pcs net: pcs: xpcs: fix SGMII state reading 2026-07-23 08:22:21 -07:00
phy net: phylink: put link_gpio if phylink_create fails 2026-07-28 18:31:11 -07:00
plip
ppp pppoe: reload header pointer after dev_hard_header() 2026-07-23 07:01:53 -07:00
pse-pd net: pse-pd: scope pse_control regulator handle to kref lifetime 2026-06-26 18:43:09 -07:00
slip net: slip: serialize receive against buffer reallocation 2026-07-23 09:06:48 -07:00
team net: team: don't recurse on the port's netdev ops lock 2026-06-04 14:04:55 -07:00
thunderbolt Including fixes from netfilter and IPsec. 2026-06-25 12:25:36 -07:00
usb net: usb: lan78xx: disable VLAN filter in promiscuous mode 2026-07-07 13:07:51 +02:00
vmxnet3 vmxnet3: fix BUG_ON in vmxnet3_get_hdr_len() for Geneve packets 2026-07-22 13:52:44 -07:00
vxlan vxlan: use pskb_network_may_pull() for transmit path header pulls 2026-07-27 15:16:15 -07:00
wan wan: wanxl: Only reset hardware after BAR mapping 2026-07-21 13:12:43 +02:00
wireguard Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-01 13:42:12 +02:00
wireless wifi: iwlegacy: replace BUG_ON() with WARN_ON() on num_stations check 2026-07-28 15:35:37 +02:00
wwan Split <linux/mod_devicetable.h> in per subsystem headers 2026-07-02 20:54:26 -10:00
xen-netback
amt.c amt: fix use-after-free in AMT delayed works 2026-07-23 07:00:35 -07:00
bareudp.c bareudp: Use rtnl_dereference() in bareudp_sock_release(). 2026-05-20 19:12:29 -07:00
dummy.c net: change ndo_set_rx_mode_async return type to int 2026-06-09 18:15:29 -07:00
eql.c
geneve.c geneve: require CAP_NET_ADMIN in the device netns for changelink 2026-07-23 08:17:09 -07:00
gtp.c gtp: check skb_pull_data() return in gtp1u_send_echo_resp() 2026-07-21 15:02:29 -07:00
ifb.c net: ifb: report ethtool stats over num_tx_queues 2026-05-14 18:40:04 -07:00
Kconfig ne2k: fold drivers/net/Space.c into ne.c 2026-05-01 16:46:53 -07:00
LICENSE.SRC
loopback.c
macsec.c macsec: fix promiscuity refcount leak in macsec_dev_open() 2026-07-11 12:52:15 +02:00
macvlan.c macvlan: fix macvlan_get_size() not reserving space for IFLA_MACVLAN_BC_CUTOFF 2026-04-16 12:17:11 +02:00
macvtap.c kernfs: pass struct ns_common instead of const void * for namespace tags 2026-04-09 14:36:52 +02:00
Makefile ne2k: fold drivers/net/Space.c into ne.c 2026-05-01 16:46:53 -07:00
mdio.c
mhi_net.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mii.c
net_failover.c net: net_failover: Fix the deadlock in slave register 2026-05-13 19:01:03 -07:00
netconsole.c netconsole: don't drop the last byte of a full-sized message 2026-06-18 18:08:41 -07:00
netkit.c net: change ndo_set_rx_mode_async return type to int 2026-06-09 18:15:29 -07:00
nlmon.c
ntb_netdev.c
pfcp.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-06-16 14:59:58 -07:00
rionet.c
sungem_phy.c
tap.c tap: free page on error paths in tap_get_user_xdp() 2026-05-22 10:08:59 -07:00
tun_vnet.h
tun.c Revert "tun/tap: add ptr_ring consume helper with netdev queue wakeup" 2026-07-29 17:12:27 -07:00
veth.c veth: convert frag_list skbs before running XDP 2026-07-24 17:02:10 -07:00
virtio_net.c virtio_net: disable cb when NAPI is busy-polled 2026-06-30 17:03:37 -07:00
vrf.c vrf: Fix a potential NPD when removing a port from a VRF 2026-04-27 17:43:22 -07:00
vsockmon.c
xen-netfront.c