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: 257d, last: 25m
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 (6)
Title Replies (including bot) Last reply
[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 1648d 1712d 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 12 2d16h 221d 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 22 22h39m 221d 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 (2028):
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/11/08 00:08 upstream ff7afaeca1a1 c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/07 14:07 upstream ff7afaeca1a1 c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in team_port_change_check
2024/11/07 09:40 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/07 07:25 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/07 03:58 upstream 7758b206117d df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/06 20:12 upstream 7758b206117d 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/06 20:08 upstream 7758b206117d 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/06 06:37 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/11/05 22:16 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce possible deadlock in team_port_change_check
2024/10/25 23:35 upstream b423f5a9a61f 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in team_port_change_check
2024/11/08 16:16 upstream 906bd684e4b1 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/11/06 18:48 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-386 possible deadlock in team_port_change_check
2024/11/09 00:15 net 55d42a0c3f9c 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/08 22:45 net 55d42a0c3f9c 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/08 21:32 net 55d42a0c3f9c 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/08 17:09 bpf 44d0469f79bd 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/08 10:21 bpf 44d0469f79bd 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/08 05:45 bpf 44d0469f79bd c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/08 02:05 bpf 44d0469f79bd c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/07 22:39 bpf 44d0469f79bd c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/07 02:12 bpf 44d0469f79bd df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/07 01:04 net 26a2bebd2c0c df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/06 23:58 net 26a2bebd2c0c df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/06 16:03 net 26a2bebd2c0c 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/06 11:15 bpf 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/06 08:51 bpf 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/06 06:58 net 9eaff63bfb59 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/06 05:30 net 9eaff63bfb59 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/06 00:42 net 9eaff63bfb59 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/05 20:17 bpf 6c52d4da1c74 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/05 18:51 net 9eaff63bfb59 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/05 17:24 bpf 6c52d4da1c74 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-bpf-kasan-gce possible deadlock in team_port_change_check
2024/11/05 15:28 net 249cfa318fb1 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/05 12:29 net 249cfa318fb1 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-this-kasan-gce possible deadlock in team_port_change_check
2024/11/05 07:01 net 249cfa318fb1 509da429 .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/11/08 19:40 net-next 2696e451dfb0 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/08 12:16 net-next 2696e451dfb0 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/08 09:00 net-next 2696e451dfb0 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/08 07:43 net-next 2696e451dfb0 179b040e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/07 17:32 net-next 2a6f99ee1a80 c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/07 16:40 net-next 2a6f99ee1a80 c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/07 15:35 net-next 2a6f99ee1a80 c069283c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/07 10:58 net-next 720d33143276 df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/07 06:26 net-next 720d33143276 df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/06 22:15 net-next a84e8c05f583 df3dc63b .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/06 14:38 net-next a84e8c05f583 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/06 13:13 net-next a84e8c05f583 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/06 03:37 net-next ccb35037c48a 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/06 02:20 net-next ccb35037c48a 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/05 16:42 net-next c688a96c432e 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/05 11:23 net-next c688a96c432e 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/11/05 02:11 net-next ecf99864ea6b 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce possible deadlock in team_port_change_check
2024/10/23 18:33 bpf-next 1f7c33630724 15fa2979 .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/17 13:02 linux-next 797012914d2d 215bec2d .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/10/25 19:22 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 7678c1b2735a 65e8686b .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.