syzbot


possible deadlock in team_device_event

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

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.9.0-rc1-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.5/4691 is trying to acquire lock:
ffff88805df74c78 (team->team_lock_key#6){+.+.}-{3:3}, at: team_port_change_check drivers/net/team/team.c:2969 [inline]
ffff88805df74c78 (team->team_lock_key#6){+.+.}-{3:3}, at: team_device_event+0x372/0xab6 drivers/net/team/team.c:2995

but task is already holding lock:
ffff88805df74c78 (team->team_lock_key#6){+.+.}-{3:3}, at: team_add_slave+0x9f/0x1960 drivers/net/team/team.c:1966

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

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

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor.5/4691:
 #0: ffffffff8a7e76c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8a7e76c8 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3f9/0xad0 net/core/rtnetlink.c:5560
 #1: ffff88805df74c78 (team->team_lock_key#6){+.+.}-{3:3}, at: team_add_slave+0x9f/0x1960 drivers/net/team/team.c:1966

stack backtrace:
CPU: 0 PID: 4691 Comm: syz-executor.5 Not tainted 5.9.0-rc1-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+0x18f/0x20d lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline]
 check_deadlock kernel/locking/lockdep.c:2432 [inline]
 validate_chain kernel/locking/lockdep.c:3202 [inline]
 __lock_acquire.cold+0x115/0x396 kernel/locking/lockdep.c:4426
 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:5005
 __mutex_lock_common kernel/locking/mutex.c:956 [inline]
 __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103
 team_port_change_check drivers/net/team/team.c:2969 [inline]
 team_device_event+0x372/0xab6 drivers/net/team/team.c:2995
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2033
 call_netdevice_notifiers_extack net/core/dev.c:2045 [inline]
 call_netdevice_notifiers net/core/dev.c:2059 [inline]
 dev_close_many+0x30b/0x650 net/core/dev.c:1634
 vlan_device_event+0x8ef/0x2010 net/8021q/vlan.c:450
 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2033
 call_netdevice_notifiers_extack net/core/dev.c:2045 [inline]
 call_netdevice_notifiers net/core/dev.c:2059 [inline]
 dev_close_many+0x30b/0x650 net/core/dev.c:1634
 dev_close net/core/dev.c:1656 [inline]
 dev_close+0x173/0x220 net/core/dev.c:1650
 team_port_add drivers/net/team/team.c:1305 [inline]
 team_add_slave+0xf45/0x1960 drivers/net/team/team.c:1967
 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2517
 do_setlink+0x911/0x3a70 net/core/rtnetlink.c:2713
 __rtnl_newlink+0xc1c/0x1740 net/core/rtnetlink.c:3374
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3500
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5563
 netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470
 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
 netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:671
 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353
 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407
 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45d5b9
Code: 5d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f3517256c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 000000000002ccc0 RCX: 000000000045d5b9
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003
RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c
R13: 00007fff1414118f R14: 00007f35172579c0 R15: 000000000118cf4c

Crashes (30):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/02 13:58 bpf 1eb832ac2dee abf9ba4f .config console log report ci-upstream-bpf-kasan-gce
2020/08/21 05:02 bpf 1e891e513e16 1d75fe45 .config console log report ci-upstream-bpf-kasan-gce
2020/08/21 02:57 bpf 1e891e513e16 1d75fe45 .config console log report ci-upstream-bpf-kasan-gce
2020/08/20 12:11 bpf 00fa1d83a8b5 ed282a3a .config console log report ci-upstream-bpf-kasan-gce
2020/08/20 03:03 bpf 00fa1d83a8b5 94b45706 .config console log report ci-upstream-bpf-kasan-gce
2020/08/20 01:30 bpf 00fa1d83a8b5 94b45706 .config console log report ci-upstream-bpf-kasan-gce
2020/08/20 01:10 bpf 00fa1d83a8b5 94b45706 .config console log report ci-upstream-bpf-kasan-gce
2020/08/20 00:11 bpf 00fa1d83a8b5 94b45706 .config console log report ci-upstream-bpf-kasan-gce
2020/08/19 22:43 bpf 00fa1d83a8b5 94b45706 .config console log report ci-upstream-bpf-kasan-gce
2020/08/19 12:27 bpf 3fb1a96a9112 e1c29030 .config console log report ci-upstream-bpf-kasan-gce
2020/06/26 07:56 bpf 7a64135f3229 aea82c00 .config console log report ci-upstream-bpf-kasan-gce
2020/09/01 15:16 bpf-next 29523c5e6716 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/09/01 12:22 bpf-next 29523c5e6716 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/09/01 04:13 bpf-next 29523c5e6716 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 14:33 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 12:31 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 11:31 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 09:01 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 08:00 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/31 03:31 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/30 17:07 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/30 13:52 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/30 13:24 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/30 10:16 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/30 03:32 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/29 22:12 bpf-next 10496f261ed3 d5a3ae1f .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/26 08:05 bpf-next cd04b04de119 344da168 .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/20 16:14 bpf-next c1447efdafff ed282a3a .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/20 14:16 bpf-next c1447efdafff ed282a3a .config console log report ci-upstream-bpf-next-kasan-gce
2020/08/19 10:14 bpf-next a12a625ce7db e1c29030 .config console log report ci-upstream-bpf-next-kasan-gce
* Struck through repros no longer work on HEAD.