syzbot


possible deadlock in team_vlan_rx_add_vid

Status: upstream: reported C repro on 2020/09/01 18:26
Reported-by: syzbot+9a692947a2e5d37361db@syzkaller.appspotmail.com
First crash: 763d, last: 1d17h

Fix bisection: failed (bisect log)
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_vlan_rx_add_vid (2) 1 392d 391d 0/24 auto-closed as invalid on 2022/01/05 11:04
upstream possible deadlock in team_vlan_rx_add_vid syz 5 1484d 1518d 12/24 fixed on 2018/10/11 14:33
linux-4.14 possible deadlock in team_vlan_rx_add_vid C error 6 341d 764d 0/1 upstream: reported C repro on 2020/09/01 01:47

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): veth1_to_batadv: link becomes ready
device team1 entered promiscuous mode
IPv6: ADDRCONF(NETDEV_UP): macvtap1: link is not ready
8021q: adding VLAN 0 to HW filter on device macvtap1
============================================
WARNING: possible recursive locking detected
4.19.142-syzkaller #0 Not tainted
--------------------------------------------
syz-executor185/6487 is trying to acquire lock:
000000001de11139 (&team->lock){+.+.}, at: team_vlan_rx_add_vid+0x38/0x1e0 drivers/net/team/team.c:1896

but task is already holding lock:
00000000c5ea76c1 (&team->lock){+.+.}, at: team_add_slave+0x98/0x1eb0 drivers/net/team/team.c:1975

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&team->lock);
  lock(&team->lock);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor185/6487:
 #0: 0000000040c831f1 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
 #0: 0000000040c831f1 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4775
 #1: 00000000c5ea76c1 (&team->lock){+.+.}, at: team_add_slave+0x98/0x1eb0 drivers/net/team/team.c:1975

stack backtrace:
CPU: 0 PID: 6487 Comm: syz-executor185 Not tainted 4.19.142-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2fe lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:1763 [inline]
 check_deadlock kernel/locking/lockdep.c:1807 [inline]
 validate_chain kernel/locking/lockdep.c:2403 [inline]
 __lock_acquire.cold+0x121/0x57e kernel/locking/lockdep.c:3415
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907
 __mutex_lock_common kernel/locking/mutex.c:925 [inline]
 __mutex_lock+0xd7/0x1260 kernel/locking/mutex.c:1072
 team_vlan_rx_add_vid+0x38/0x1e0 drivers/net/team/team.c:1896
 vlan_add_rx_filter_info+0x13c/0x1c0 net/8021q/vlan_core.c:210
 __vlan_vid_add net/8021q/vlan_core.c:278 [inline]
 vlan_vid_add+0x3ee/0x7e0 net/8021q/vlan_core.c:308
 vlan_add_rx_filter_info+0x13c/0x1c0 net/8021q/vlan_core.c:210
 __vlan_vid_add net/8021q/vlan_core.c:278 [inline]
 vlan_vid_add+0x3ee/0x7e0 net/8021q/vlan_core.c:308
 vlan_device_event.cold+0x28/0x2d net/8021q/vlan.c:381
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
 call_netdevice_notifiers net/core/dev.c:1762 [inline]
 dev_open net/core/dev.c:1442 [inline]
 dev_open+0x128/0x140 net/core/dev.c:1430
 team_port_add drivers/net/team/team.c:1220 [inline]
 team_add_slave+0xa3c/0x1eb0 drivers/net/team/team.c:1976
 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321
 rtnl_newlink+0x1270/0x15b0 net/core/rtnetlink.c:3170
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4778
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2455
 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1344
 netlink_sendmsg+0x6bb/0xc40 net/netlink/af_netlink.c:1909
 sock_sendmsg_nosec net/socket.c:622 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:632
 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2115
 __sys_sendmsg net/socket.c:2153 [inline]
 __do_sys_sendmsg net/socket.c:2162 [inline]
 __se_sys_sendmsg net/socket.c:2160 [inline]
 __x64_sys_sendmsg+0x132/0x220 net/socket.c:2160
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x443759
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 0f fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffef647faa8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000443759
RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000004
RBP: 000000306d616574 R08: 0000000001bbbbbb R09: 0000000001bbbbbb
R10: 0000000001bbbbbb R11: 0000000000000246 R12: 00007ffef647fac0
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
team0: Device macvtap1 failed to register rx_handler

Crashes (26):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-19 2020/09/01 18:25 linux-4.19.y f6d5cb9e2c06 d5a3ae1f .config log report syz C
ci2-linux-4-19 2022/10/03 09:43 linux-4.19.y 3f8a27f9e27b feb56351 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/09/20 14:17 linux-4.19.y 3f8a27f9e27b 7c41a9ba .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/09/18 18:41 linux-4.19.y 3f8a27f9e27b dd9a85ff .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/09/18 16:52 linux-4.19.y 3f8a27f9e27b dd9a85ff .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/09/01 16:53 linux-4.19.y 3f8a27f9e27b 86c46e46 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/08/25 11:49 linux-4.19.y 3f8a27f9e27b 514514f6 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/08/20 03:11 linux-4.19.y 3f8a27f9e27b 26a13b38 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/07/09 15:25 linux-4.19.y 3f8a27f9e27b b5765a15 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/07/06 04:10 linux-4.19.y 3f8a27f9e27b bff65f44 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/06/19 06:29 linux-4.19.y 3f8a27f9e27b 8f633d84 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/05/26 19:58 linux-4.19.y 3f8a27f9e27b 3037caa9 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/05/20 17:38 linux-4.19.y 3f8a27f9e27b bd37ad7e .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/05/14 21:36 linux-4.19.y 3f8a27f9e27b 744a39e2 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/05/02 14:50 linux-4.19.y 3f8a27f9e27b 2df221f6 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/04/14 23:49 linux-4.19.y 3f8a27f9e27b b17b2923 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/03/14 09:27 linux-4.19.y 3f8a27f9e27b 9e8eaa75 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/03/03 17:18 linux-4.19.y 3f8a27f9e27b 45a13a73 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/02/08 05:23 linux-4.19.y 3f8a27f9e27b a7dab638 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/02/02 08:11 linux-4.19.y 3f8a27f9e27b 4ebb2798 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2022/01/31 13:51 linux-4.19.y 3f8a27f9e27b a491ad2d .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2021/12/13 00:39 linux-4.19.y 3f8a27f9e27b 49ca1f59 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2021/09/22 02:22 linux-4.19.y b172b44fcb17 169724fe .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2021/08/09 16:14 linux-4.19.y 5c66974a6304 6972b106 .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2021/06/26 23:06 linux-4.19.y eb575cd5d7f6 9d2ab5df .config log report info possible deadlock in team_vlan_rx_add_vid
ci2-linux-4-19 2021/01/31 15:20 linux-4.19.y 811218eceeaa fc9fd31e .config log report info possible deadlock in team_vlan_rx_add_vid
* Struck through repros no longer work on HEAD.