syzbot


possible deadlock in team_port_change_check (2)

Status: upstream: reported C repro on 2024/02/29 16:02
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+3c47b5843403a45aef57@syzkaller.appspotmail.com
First crash: 140d, last: 1h30m
Cause bisection: introduced by (bisect log) :
commit ec4ffd100ffb396eca13ebe7d18938ea80f399c3
Author: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon Jan 8 09:41:02 2024 +0000

  Revert "net: rtnetlink: Enslave device before bringing it up"

Crash: possible deadlock in team_port_change_check (log)
Repro: C syz .config
  
Discussions (3)
Title Replies (including bot) Last reply
[syzbot] [net?] possible deadlock in team_port_change_check (2) 3 (8) 2024/03/07 10:48
Re: [syzbot] [net?] possible deadlock in team_port_change_check (2) 1 (1) 2024/03/03 08:39
Re: [syzbot] [net?] possible deadlock in team_port_change_check (2) 1 (1) 2024/03/02 13:52
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_port_change_check net 2 1531d 1595d 0/27 auto-closed as invalid on 2020/09/02 22:06
linux-5.15 possible deadlock in team_port_change_check origin:upstream C 6 3d06h 104d 0/3 upstream: reported C repro on 2024/04/01 19:31
linux-6.1 possible deadlock in team_port_change_check origin:upstream C 7 32d 104d 0/3 upstream: reported C repro on 2024/04/01 17:20
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/03/07 10:02 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master OK log
2024/03/07 09:26 21m eadavis@qq.com patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master report log

Sample crash report:
netlink: 'syz-executor162': attribute type 10 has an invalid length.
team0: Port device vlan0 added
netlink: 'syz-executor162': attribute type 10 has an invalid length.
veth0_vlan: left promiscuous mode
veth0_vlan: entered promiscuous mode
============================================
WARNING: possible recursive locking detected
6.8.0-syzkaller-08073-g480e035fc4c7 #0 Not tainted
--------------------------------------------
syz-executor162/5067 is trying to acquire lock:
ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_port_change_check+0x51/0x1e0 drivers/net/team/team.c:2995

but task is already holding lock:
ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_add_slave+0xad/0x2750 drivers/net/team/team.c:1973

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

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

 *** DEADLOCK ***

 May be due to missing lock nesting notation

2 locks held by syz-executor162/5067:
 #0: ffffffff8f38ce88 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
 #0: ffffffff8f38ce88 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x842/0x10d0 net/core/rtnetlink.c:6592
 #1: ffff88807e6f4d20 (team->team_lock_key){+.+.}-{3:3}, at: team_add_slave+0xad/0x2750 drivers/net/team/team.c:1973

stack backtrace:
CPU: 0 PID: 5067 Comm: syz-executor162 Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 check_deadlock kernel/locking/lockdep.c:3062 [inline]
 validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856
 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:608 [inline]
 __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752
 team_port_change_check+0x51/0x1e0 drivers/net/team/team.c:2995
 team_device_event+0x4e6/0x5b0 drivers/net/team/team.c:3018
 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
 __dev_notify_flags+0x207/0x400
 dev_change_flags+0xf0/0x1a0 net/core/dev.c:8760
 vlan_device_event+0x1b81/0x1de0 net/8021q/vlan.c:468
 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
 call_netdevice_notifiers_extack net/core/dev.c:1988 [inline]
 call_netdevice_notifiers net/core/dev.c:2002 [inline]
 dev_open+0x13a/0x1b0 net/core/dev.c:1471
 team_port_add drivers/net/team/team.c:1214 [inline]
 team_add_slave+0x9b3/0x2750 drivers/net/team/team.c:1974
 do_set_master net/core/rtnetlink.c:2685 [inline]
 do_setlink+0xe70/0x41f0 net/core/rtnetlink.c:2891
 __rtnl_newlink net/core/rtnetlink.c:3680 [inline]
 rtnl_newlink+0x180b/0x20a0 net/core/rtnetlink.c:3727
 rtnetlink_rcv_msg+0x89b/0x10d0 net/core/rtnetlink.c:6595
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2559
 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline]
 netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1361
 netlink_sendmsg+0x8e1/0xcb0 net/netlink/af_netlink.c:1905
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
 ___sys_sendmsg net/socket.c:2638 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
 do_syscall_64+0xfb/0x240
 entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7fd9ea5f5b09
Code: 48 83 c4 28 c3 e8 d7 19 00 00 0f 1f 80 00 00 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff8ef3bc18 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fd9ea6433d3 RCX: 00007fd9ea5f5b09
RDX: 0000000000000000 RSI: 0000000020000600 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000246 R12: 00007fff8ef3bc50
R13: 00007fd9ea643004 R14: 00007fff8ef3bc3c R15: 0000000000000003
 </TASK>

Crashes (434):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/01 19:04 upstream 480e035fc4c7 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/03/05 23:21 upstream 90d35da658da f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/04/01 19:12 net f99c5f563c17 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/04/01 19:06 bpf 443574b03387 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/03/05 23:24 net 4daa873133d3 f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/05/04 06:52 net-next 5829614a7b3b 610f2a54 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/04/02 07:35 bpf-next 14bb1e8c8d4a 6baf5069 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/03/05 22:43 net-next 885c36e59f46 f39a7eed .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/03/09 20:18 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 707081b61156 6ee49f2e .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in team_port_change_check
2024/07/12 03:58 upstream 43db1e03c086 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/07/11 22:07 upstream 9d9a2f29aefd c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/07/11 17:32 upstream 9d9a2f29aefd c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/07/07 08:22 upstream 22f902dfc51e bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/06/22 16:21 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in team_port_change_check
2024/06/25 19:30 upstream 55027e689933 da0bd5ca .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/07/14 22:52 net 70c676cb3dfc eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/14 12:42 net 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/14 06:38 net 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/13 22:49 net 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/13 06:09 net 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/12 19:29 net 425652d45c31 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/12 14:56 net 503757c80928 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/11 00:30 net e1533b6319ab e7213be3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/10 22:28 net e1533b6319ab e7213be3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/10 11:01 net e1533b6319ab e7213be3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/10 03:53 net 0913ec336a6c 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/08 00:05 net 0ec986ed7bab bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/07 20:05 net 0ec986ed7bab bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/07 04:19 net 0ec986ed7bab bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/05/10 10:08 bpf 3e9bc0472b91 de979bc2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/02/26 08:27 net 2a770cdc4382 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/02/25 15:49 net 2a770cdc4382 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/07/15 01:58 net-next 852e42cc2dd4 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/14 18:36 net-next 852e42cc2dd4 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/14 15:46 net-next 852e42cc2dd4 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/14 01:56 net-next 8e5f53a68433 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/13 15:12 net-next 69cf87304dcb eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/13 14:06 net-next 69cf87304dcb eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/13 07:10 net-next 338a93cf4a18 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/13 02:03 net-next 338a93cf4a18 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/12 18:15 net-next 80ab5445da62 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/12 16:05 net-next 80ab5445da62 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/12 13:51 net-next 80ab5445da62 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/12 10:30 net-next 80ab5445da62 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 23:21 net-next 58f9416d413a c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 19:05 net-next 58f9416d413a c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 12:57 net-next ce2f84ebcd85 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 11:29 bpf-next 18a8a4c88fb4 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/07/11 10:04 net-next ce2f84ebcd85 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 08:09 net-next ce2f84ebcd85 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/11 06:24 net-next ce2f84ebcd85 c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/10 20:46 net-next 40ab9e0dc865 e7213be3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/09 18:26 net-next 870a1dbcbc2e 79d68ada .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/09 12:09 net-next e0ee68a8bef9 bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/09 10:36 net-next e0ee68a8bef9 bc23a442 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/08 04:37 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/08 04:11 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/08 01:23 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/07 18:05 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/07 16:43 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/07 14:13 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/07 11:33 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/07/07 05:24 net-next 2f5e6395714d bc4ebbb5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/06/14 07:11 linux-next a957267fa7e9 a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in team_port_change_check
2024/04/27 23:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 6a71d2909427 07b455f9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 possible deadlock in team_port_change_check
* Struck through repros no longer work on HEAD.