syzbot


possible deadlock in team_port_change_check

Status: auto-closed as invalid on 2020/09/02 22:06
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+eeca95faae43d590987b@syzkaller.appspotmail.com
First crash: 1487d, last: 1422d
Discussions (1)
Title Replies (including bot) Last reply
possible deadlock in team_port_change_check 1 (2) 2020/03/03 14:10
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_port_change_check (2) net C done 23 3h45m 28d 0/26 upstream: reported C repro on 2024/02/29 16:02

Sample crash report:
============================================
WARNING: possible recursive locking detected
5.7.0-rc2-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.2/31788 is trying to acquire lock:
ffff88806606ac78 (team->team_lock_key#3){+.+.}-{3:3}, at: team_port_change_check+0x43/0x130 drivers/net/team/team.c:2968

but task is already holding lock:
ffff88806606ac78 (team->team_lock_key#3){+.+.}-{3:3}, at: team_add_slave+0x9d/0x1790 drivers/net/team/team.c:1965

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/31788:
 #0: ffffffff8a582d48 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:72 [inline]
 #0: ffffffff8a582d48 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x3f9/0xad0 net/core/rtnetlink.c:5458
 #1: ffff88806606ac78 (team->team_lock_key#3){+.+.}-{3:3}, at: team_add_slave+0x9d/0x1790 drivers/net/team/team.c:1965

stack backtrace:
CPU: 0 PID: 31788 Comm: syz-executor.2 Not tainted 5.7.0-rc2-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+0x188/0x20d lib/dump_stack.c:118
 print_deadlock_bug kernel/locking/lockdep.c:2410 [inline]
 check_deadlock kernel/locking/lockdep.c:2451 [inline]
 validate_chain kernel/locking/lockdep.c:3221 [inline]
 __lock_acquire.cold+0x178/0x3f8 kernel/locking/lockdep.c:4355
 lock_acquire+0x1f2/0x8f0 kernel/locking/lockdep.c:4934
 __mutex_lock_common kernel/locking/mutex.c:956 [inline]
 __mutex_lock+0x156/0x13c0 kernel/locking/mutex.c:1103
 team_port_change_check+0x43/0x130 drivers/net/team/team.c:2968
 team_device_event+0x163/0x410 drivers/net/team/team.c:2994
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:83
 call_netdevice_notifiers_info net/core/dev.c:1948 [inline]
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1933
 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline]
 call_netdevice_notifiers net/core/dev.c:1974 [inline]
 dev_close_many+0x2f5/0x620 net/core/dev.c:1549
 vlan_device_event+0x8fe/0x1fe0 net/8021q/vlan.c:450
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:83
 call_netdevice_notifiers_info net/core/dev.c:1948 [inline]
 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1933
 call_netdevice_notifiers_extack net/core/dev.c:1960 [inline]
 call_netdevice_notifiers net/core/dev.c:1974 [inline]
 dev_close_many+0x2f5/0x620 net/core/dev.c:1549
 dev_close.part.0+0xfd/0x1c0 net/core/dev.c:1571
 dev_close+0x58/0x70 net/core/dev.c:1574
 team_port_add drivers/net/team/team.c:1305 [inline]
 team_add_slave+0xf2a/0x1790 drivers/net/team/team.c:1966
 do_set_master net/core/rtnetlink.c:2477 [inline]
 do_set_master+0x1d7/0x230 net/core/rtnetlink.c:2450
 do_setlink+0xaa2/0x3680 net/core/rtnetlink.c:2612
 __rtnl_newlink+0xad5/0x1590 net/core/rtnetlink.c:3273
 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3398
 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5461
 netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469
 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
 netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
 netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
 sock_sendmsg_nosec net/socket.c:652 [inline]
 sock_sendmsg+0xcf/0x120 net/socket.c:672
 ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362
 ___sys_sendmsg+0x100/0x170 net/socket.c:2416
 __sys_sendmsg+0xec/0x1b0 net/socket.c:2449
 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x45c829
Code: 0d b7 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 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f3643431c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000500b20 RCX: 000000000045c829
RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000004
RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000000009fd R14: 00000000004ccb59 R15: 00007f36434326d4

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/05 22:05 bpf-next 07bf2d97d1f3 4b76dd25 .config console log report ci-upstream-bpf-next-kasan-gce
2020/03/02 09:36 net-next-old 3b3e808cd883 c88c7b75 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.