WSL2-Linux-Kernel/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 net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() 2022-03-03 10:29:13 +00:00
bonding bonding: do not discard lowest hash bit for non layer3+4 hashing 2022-04-17 13:34:01 +01:00
caif net: caif: Use netif_rx(). 2022-03-04 12:02:19 +00:00
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 hamradio: Fix wrong assignment of 'bbc->cfg.loopback' 2022-03-16 19:17:49 -07:00
hippi drivers: net: hippi: Fix deadlock in rr_close() 2022-04-21 10:30:45 +02:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-17 13:56:58 -07:00
ieee802154 spi: Updates for v5.18 2022-03-21 18:33:57 -07:00
ipa net: ipa: use struct_size() for the interconnect array 2022-03-11 22:50:07 -08:00
ipvlan net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
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 devlink: hold the instance lock during eswitch_mode callbacks 2022-03-21 14:11:38 +00:00
pcs
phy net: phy: LAN937x: added PHY_POLL_CABLE_TEST flag 2022-04-15 10:50:01 +01:00
plip slip/plip: Use netif_rx(). 2022-03-06 11:05:31 +00:00
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 Revert "xen-netback: Check for hotplug-status existence before watching" 2022-02-24 08:58:37 -08:00
Kconfig
LICENSE.SRC
Makefile vxlan: move to its own directory 2022-03-01 08:38:01 +00:00
Space.c
amt.c
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-03-16 19:16:57 -07:00
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 gtp: Fix inconsistent indenting 2022-03-16 08:47:02 -07:00
ifb.c
loopback.c net: Add skb_clear_tstamp() to keep the mono delivery_time 2022-03-03 14:38:48 +00:00
macsec.c
macvlan.c macvlan: Fix leaking skb in source mode with nodst option 2022-04-13 12:25:02 +01:00
macvtap.c macvtap: advertise link netns via netlink 2022-03-01 17:59:28 -08:00
mdio.c
mhi_net.c
mii.c
net_failover.c net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: tap: track dropped skb via kfree_skb_reason() 2022-03-06 11:04:01 +00:00
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 xen/grant-table: remove readonly parameter from functions 2022-03-15 20:34:40 -05:00