Messages in this thread Patch in this message | | | From | Hillf Danton <> | Subject | Re: [syzbot] [net?] possible deadlock in hsr_dev_xmit (2) | Date | Mon, 1 Apr 2024 21:03:28 +0800 |
| |
On Sun, 31 Mar 2024 23:11:27 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: 480e035fc4c7 Merge tag 'drm-next-2024-03-13' of https://gi.. > git tree: upstream > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15e0f5c3180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 480e035fc4c7
--- x/net/hsr/hsr_device.c +++ y/net/hsr/hsr_device.c @@ -226,9 +226,11 @@ static netdev_tx_t hsr_dev_xmit(struct s skb->dev = master->dev; skb_reset_mac_header(skb); skb_reset_mac_len(skb); - spin_lock_bh(&hsr->seqnr_lock); + local_bh_disable(); + spin_lock_nested(&hsr->seqnr_lock, 1); hsr_forward_skb(skb, master); - spin_unlock_bh(&hsr->seqnr_lock); + spin_unlock(&hsr->seqnr_lock); + local_bh_enable(); } else { dev_core_stats_tx_dropped_inc(dev); dev_kfree_skb_any(skb); --
| |