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: 299d, last: 21m
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 (7)
Title Replies (including bot) Last reply
[syzbot] Monthly net report (Dec 2024) 0 (1) 2024/12/05 09:04
[syzbot] Monthly net report (Oct 2024) 0 (1) 2024/10/03 09:02
[syzbot] Monthly net report (Sep 2024) 0 (1) 2024/09/02 08:21
[syzbot] Monthly net report (Aug 2024) 0 (1) 2024/08/02 07:26
[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 1690d 1754d 0/28 auto-closed as invalid on 2020/09/02 22:06
linux-5.15 possible deadlock in team_port_change_check origin:upstream C 21 3d15h 263d 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 39 1d04h 263d 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 (3008):
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/12/19 15:06 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in team_port_change_check
2024/12/19 04:52 upstream c061cf420ded 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/12/09 07:55 upstream 62b5a46999c7 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/12/21 13:03 upstream 499551201b5f d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/12/20 20:10 upstream 8faabc041a00 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/12/18 16:30 upstream aef25be35d23 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/12/21 08:42 bpf 4a58963d10fa d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 21:15 bpf d888b7af7c14 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 14:08 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 13:47 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 11:16 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 10:05 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/20 07:03 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 22:18 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 20:14 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 16:13 bpf 716f2bca1ce9 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 08:32 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 07:30 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 06:13 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/19 01:53 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 23:04 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 17:39 bpf 23579010cf0a 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 11:29 bpf 23579010cf0a a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 09:52 bpf 23579010cf0a a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 06:55 bpf 23579010cf0a a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/18 04:20 bpf 23579010cf0a a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/12/08 20:40 net 09310cfd4ea5 9ac0fdc6 .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/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/12/21 14:17 net-next ae418e95dd93 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/12/21 11:45 bpf-next c5d2bac978c5 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/21 09:45 bpf-next c5d2bac978c5 d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/21 03:53 bpf-next c5d2bac978c5 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/21 02:33 bpf-next c5d2bac978c5 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 23:55 bpf-next c5d2bac978c5 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 22:42 bpf-next c5d2bac978c5 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 18:19 bpf-next c5d2bac978c5 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 16:59 bpf-next 8eef6ac4d70e 1ac6aa80 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 12:17 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 08:22 net-next b73e56f16250 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/12/20 05:53 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 04:32 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 02:38 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/20 01:31 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/19 19:02 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/19 17:59 bpf-next 8eef6ac4d70e 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/19 11:41 bpf-next 8eef6ac4d70e 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/19 09:46 bpf-next 8eef6ac4d70e 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/19 03:24 net-next c1bad69f8baf 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/12/19 00:30 bpf-next 8eef6ac4d70e 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/18 19:02 bpf-next a7c205120d33 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/18 12:56 bpf-next a7c205120d33 a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/18 08:02 bpf-next a7c205120d33 a0626d3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/18 01:58 bpf-next a7c205120d33 c8c15bb2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-next-kasan-gce possible deadlock in team_port_change_check
2024/12/17 23:55 net-next d22f955cc2cb c8c15bb2 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/12/11 02:22 linux-next af2ea8ab7a54 cfc402b4 .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/11/27 02:12 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7b1d1d4cfac0 52b38cc1 .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.