linux-stable/drivers/net
Duoming Zhou bc6de28784 drivers: net: hippi: Fix deadlock in rr_close()
There is a deadlock in rr_close(), which is shown below:

   (Thread 1)                |      (Thread 2)
                             | rr_open()
rr_close()                   |  add_timer()
 spin_lock_irqsave() //(1)   |  (wait a time)
 ...                         | rr_timer()
 del_timer_sync()            |  spin_lock_irqsave() //(2)
 (wait timer to stop)        |  ...

We hold rrpriv->lock in position (1) of thread 1 and
use del_timer_sync() to wait timer to stop, but timer handler
also need rrpriv->lock in position (2) of thread 2.
As a result, rr_close() will block forever.

This patch extracts del_timer_sync() from the protection of
spin_lock_irqsave(), which could let timer handler to obtain
the needed lock.

Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://lore.kernel.org/r/20220417125519.82618-1-duoming@zju.edu.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-04-21 10:30:45 +02:00
..
appletalk
arcnet
bonding bonding: do not discard lowest hash bit for non layer3+4 hashing 2022-04-17 13:34:01 +01:00
caif
can can: gs_usb: gs_make_candev(): fix memory leak for devices with extended bit timing configuration 2022-03-31 09:55:27 +02:00
dsa net: dsa: felix: fix tagging protocol changes with multiple CPU ports 2022-04-14 08:52:26 +02:00
ethernet net: stmmac: Use readl_poll_timeout_atomic() in atomic state 2022-04-20 11:10:27 +01:00
fddi
fjes
hamradio
hippi drivers: net: hippi: Fix deadlock in rr_close() 2022-04-21 10:30:45 +02:00
hyperv
ieee802154 spi: Updates for v5.18 2022-03-21 18:33:57 -07:00
ipa
ipvlan
mctp mctp i2c: correct mctp_i2c_header_create result 2022-04-01 12:04:15 +01:00
mdio net: mdio: don't defer probe forever if PHY IRQ provider is missing 2022-04-08 14:17:55 -07:00
netdevsim
pcs
phy net: phy: LAN937x: added PHY_POLL_CABLE_TEST flag 2022-04-15 10:50:01 +01:00
plip
ppp
slip drivers: net: slip: fix NPD bug in sl_tx_timeout() 2022-04-06 23:00:16 -07:00
team
usb net: usb: aqc111: Fix out-of-bounds accesses in RX fixup 2022-04-06 15:22:49 +01:00
vmxnet3
vxlan vxlan: fix error return code in vxlan_fdb_append 2022-04-08 12:35:12 +01:00
wan Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
wireguard wireguard: socket: ignore v6 endpoints when ipv6 is disabled 2022-03-30 19:14:09 -07:00
wireless Networking fixes for 5.18-rc3, including fixes from wireless and 2022-04-14 11:58:19 -07:00
wwan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-23 10:53:49 -07:00
xen-netback
amt.c
bareudp.c
dummy.c
eql.c
geneve.c net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT 2022-03-22 22:19:46 -07:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: Fix leaking skb in source mode with nodst option 2022-04-13 12:25:02 +01:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: annotate access to queue->trans_start 2022-04-14 08:30:09 +02:00
veth.c veth: Ensure eth header is in skb's linear part 2022-04-08 12:15:28 +01:00
virtio_net.c virtio: features, fixes 2022-03-31 13:57:15 -07:00
vrf.c vrf: fix packet sniffing for traffic originating from ip tunnels 2022-04-01 11:56:55 +01:00
vsockmon.c
xen-netfront.c