[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240401130328.3529-1-hdanton@sina.com>
Date: Mon, 1 Apr 2024 21:03:28 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+fbf74291c3b7e753b481@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [net?] possible deadlock in hsr_dev_xmit (2)
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);
--
Powered by blists - more mailing lists