syzbot


possible deadlock in team_device_event (2)

Status: auto-closed as invalid on 2022/03/29 04:55
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+d6d7f5e816b836806b38@syzkaller.appspotmail.com
First crash: 1285d, last: 1045d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] possible deadlock in team_device_event (2) 0 (1) 2021/04/06 20:27
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_device_event net 30 1498d 1566d 0/28 auto-closed as invalid on 2020/12/31 13:59
upstream possible deadlock in team_device_event (3) net C 9 9d07h 153d 0/28 upstream: reported C repro on 2024/05/09 16:54

Sample crash report:
netlink: 'syz-executor.2': attribute type 10 has an invalid length.
netlink: 'syz-executor.2': attribute type 10 has an invalid length.
============================================
WARNING: possible recursive locking detected
5.16.0-rc2-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.2/12422 is trying to acquire lock:
ffff8880265facf8 (team->team_lock_key#3){+.+.}-{3:3}, at: team_port_change_check drivers/net/team/team.c:2970 [inline]
ffff8880265facf8 (team->team_lock_key#3){+.+.}-{3:3}, at: team_device_event+0x36a/0xa90 drivers/net/team/team.c:2996

but task is already holding lock:
ffff8880265facf8 (team->team_lock_key#3){+.+.}-{3:3}, at: team_del_slave+0x29/0x140 drivers/net/team/team.c:1981

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

       CPU0
       ----
  lock(team->team_lock_key#3);
  lock(team->team_lock_key#3);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor.2/12422:
 #0: ffffffff8d30c8a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8d30c8a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3be/0xb80 net/core/rtnetlink.c:5568
 #1: ffff8880265facf8 (team->team_lock_key#3){+.+.}-{3:3}, at: team_del_slave+0x29/0x140 drivers/net/team/team.c:1981

stack backtrace:
CPU: 0 PID: 12422 Comm: syz-executor.2 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
 check_deadlock kernel/locking/lockdep.c:2999 [inline]
 validate_chain kernel/locking/lockdep.c:3788 [inline]
 __lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027
 lock_acquire kernel/locking/lockdep.c:5637 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
 __mutex_lock_common kernel/locking/mutex.c:607 [inline]
 __mutex_lock+0x12f/0x12f0 kernel/locking/mutex.c:740
 team_port_change_check drivers/net/team/team.c:2970 [inline]
 team_device_event+0x36a/0xa90 drivers/net/team/team.c:2996
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002
 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline]
 call_netdevice_notifiers net/core/dev.c:2028 [inline]
 dev_close_many+0x2ff/0x620 net/core/dev.c:1603
 vlan_device_event+0x8ef/0x2020 net/8021q/vlan.c:450
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002
 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline]
 call_netdevice_notifiers net/core/dev.c:2028 [inline]
 dev_close_many+0x2ff/0x620 net/core/dev.c:1603
 dev_close net/core/dev.c:1625 [inline]
 dev_close+0x16d/0x210 net/core/dev.c:1619
 team_port_del+0x34e/0x970 drivers/net/team/team.c:1349
 team_del_slave+0x34/0x140 drivers/net/team/team.c:1982
 do_set_master+0xe1/0x220 net/core/rtnetlink.c:2507
 do_setlink+0x9f3/0x3970 net/core/rtnetlink.c:2726
 __rtnl_newlink+0xde6/0x1750 net/core/rtnetlink.c:3391
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3506
 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571
 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2491
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x86d/0xda0 net/netlink/af_netlink.c:1916
 sock_sendmsg_nosec net/socket.c:704 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:724
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2409
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2463
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2492
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f09b1872ae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f09aede8188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f09b1985f60 RCX: 00007f09b1872ae9
RDX: 0000000000069010 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 00007f09b18ccf6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd7e4cb9ef R14: 00007f09aede8300 R15: 0000000000022000
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/29 04:55 net-old c5c17547b778 63eeac02 .config console log report info ci-upstream-net-this-kasan-gce possible deadlock in team_device_event
2021/11/07 16:26 net-old 70bf363d7adb 4c1be0be .config console log report info ci-upstream-net-this-kasan-gce possible deadlock in team_device_event
2021/11/03 10:08 net-old db2434343b2c 17f3edd2 .config console log report info ci-upstream-net-this-kasan-gce possible deadlock in team_device_event
2021/07/23 09:32 net-old 9f42f674a892 bc5f1d88 .config console log report info ci-upstream-net-this-kasan-gce possible deadlock in team_device_event
2021/11/09 04:15 net-next-old cc0356d6a02e 8ab17e57 .config console log report info ci-upstream-net-kasan-gce possible deadlock in team_device_event
2021/09/28 04:05 net-next-old b69c99463d41 78494d16 .config console log report info ci-upstream-net-kasan-gce possible deadlock in team_device_event
2021/04/02 20:22 net-next-old bd78980be1a6 6a81331a .config console log report info ci-upstream-net-kasan-gce possible deadlock in team_device_event
2021/08/26 18:09 linux-next 88fac11862d3 b318694d .config console log report info ci-upstream-linux-next-kasan-gce-root possible deadlock in team_device_event
* Struck through repros no longer work on HEAD.