syzbot


possible deadlock in br_del_bridge

Status: closed as invalid on 2021/10/04 21:06
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 492d, last: 483d

Cause bisection: introduced by (bisect log) [merge commit]:
commit 268ca4129d8da764fdf72916f762a1145c6ea743
Author: David S. Miller <davem@davemloft.net>
Date: Mon Jul 26 22:09:31 2021 +0000

  Merge branch 'ipa-clock'

Crash: BUG: sleeping function called from invalid context in lock_sock_nested (log)
Repro: C syz .config

Fix bisection: fixed by (bisect log) [no-op commit]:
commit 6963d6c176fe36c775996cfd6886d4c4234ccd9e
Author: Alex Deucher <alexander.deucher@amd.com>
Date: Thu Jan 21 21:39:59 2021 +0000

  drm/amdgpu: add a mutex for the smu11 i2c bus (v2)


Sample crash report:
netdevsim netdevsim0 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
======================================================
WARNING: possible circular locking dependency detected
5.14.0-rc2-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor250/8464 is trying to acquire lock:
ffffffff8d0cb568 (rtnl_mutex){+.+.}-{3:3}, at: br_del_bridge+0x14/0x110 net/bridge/br_if.c:470

but task is already holding lock:
ffffffff8d0a9608 (br_ioctl_mutex){+.+.}-{3:3}, at: br_ioctl_call+0x3b/0xa0 net/socket.c:1089

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (br_ioctl_mutex){+.+.}-{3:3}:
       __mutex_lock_common kernel/locking/mutex.c:959 [inline]
       __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104
       br_ioctl_call+0x3b/0xa0 net/socket.c:1089
       dev_ifsioc+0xc1f/0xf60 net/core/dev_ioctl.c:382
       dev_ioctl+0x1b9/0xee0 net/core/dev_ioctl.c:580
       sock_do_ioctl+0x18b/0x210 net/socket.c:1128
       sock_ioctl+0x2f1/0x640 net/socket.c:1231
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:1069 [inline]
       __se_sys_ioctl fs/ioctl.c:1055 [inline]
       __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae

-> #0 (rtnl_mutex){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3051 [inline]
       check_prevs_add kernel/locking/lockdep.c:3174 [inline]
       validate_chain kernel/locking/lockdep.c:3789 [inline]
       __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015
       lock_acquire kernel/locking/lockdep.c:5625 [inline]
       lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590
       __mutex_lock_common kernel/locking/mutex.c:959 [inline]
       __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104
       br_del_bridge+0x14/0x110 net/bridge/br_if.c:470
       br_ioctl_stub+0x2f1/0x7f0 net/bridge/br_ioctl.c:392
       br_ioctl_call+0x5e/0xa0 net/socket.c:1091
       sock_ioctl+0x30c/0x640 net/socket.c:1185
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:1069 [inline]
       __se_sys_ioctl fs/ioctl.c:1055 [inline]
       __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
       entry_SYSCALL_64_after_hwframe+0x44/0xae

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(br_ioctl_mutex);
                               lock(rtnl_mutex);
                               lock(br_ioctl_mutex);
  lock(rtnl_mutex);

 *** DEADLOCK ***

1 lock held by syz-executor250/8464:
 #0: ffffffff8d0a9608 (br_ioctl_mutex){+.+.}-{3:3}, at: br_ioctl_call+0x3b/0xa0 net/socket.c:1089

stack backtrace:
CPU: 0 PID: 8464 Comm: syz-executor250 Not tainted 5.14.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:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105
 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2131
 check_prev_add kernel/locking/lockdep.c:3051 [inline]
 check_prevs_add kernel/locking/lockdep.c:3174 [inline]
 validate_chain kernel/locking/lockdep.c:3789 [inline]
 __lock_acquire+0x2a07/0x54a0 kernel/locking/lockdep.c:5015
 lock_acquire kernel/locking/lockdep.c:5625 [inline]
 lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590
 __mutex_lock_common kernel/locking/mutex.c:959 [inline]
 __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104
 br_del_bridge+0x14/0x110 net/bridge/br_if.c:470
 br_ioctl_stub+0x2f1/0x7f0 net/bridge/br_ioctl.c:392
 br_ioctl_call+0x5e/0xa0 net/socket.c:1091
 sock_ioctl+0x30c/0x640 net/socket.c:1185
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:1069 [inline]
 __se_sys_ioctl fs/ioctl.c:1055 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:1055
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x443149
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 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 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe928ac4c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ffe928ac4d8 RCX: 0000000000443149
RDX: 00000000200000c0 RSI: 00000000000089a1 RDI: 0000000000000005
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe928ac4e0
R13: 00007ffe928ac500 R14: 00000000004b8018 R15: 00000000004004b8
syz-executor250 (8464) used gr

Crashes (124):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-net-kasan-gce 2021/07/29 17:03 net-next 883d71a55e96 b44001ce .config log report syz C possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/07/29 13:58 net-next 883d71a55e96 b44001ce .config log report syz C possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/07/29 16:38 linux-next 5a4cee98ea75 b44001ce .config log report syz C possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/05 07:12 net-next 372bbdd5bb3f 7f7bb950 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/05 03:36 net-next c2eecaa193ff b97d64c9 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/04 10:58 net-next b820c114eba7 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/04 05:38 net-next 7cdd0a89ec70 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/03 10:06 net-next 28814cd18cd7 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/03 03:43 net-next 28814cd18cd7 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/01 17:14 net-next 3e12361b6d23 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-net-kasan-gce 2021/08/01 08:34 net-next 3e12361b6d23 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/06 17:05 linux-next 8d4b477da1a8 f9e341e3 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/06 14:29 linux-next 8d4b477da1a8 f9e341e3 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/06 12:47 linux-next 8d4b477da1a8 f9e341e3 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/06 12:18 linux-next 8d4b477da1a8 f9e341e3 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/06 09:50 linux-next 8d4b477da1a8 f9e341e3 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 21:32 linux-next 8d4b477da1a8 d2d6e680 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 19:17 linux-next 8d4b477da1a8 d2d6e680 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 18:17 linux-next 8d4b477da1a8 d2d6e680 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 15:52 linux-next 8d4b477da1a8 7f7bb950 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 08:20 linux-next 8d4b477da1a8 7f7bb950 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/05 00:22 linux-next 8d4b477da1a8 b97d64c9 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 22:19 linux-next 8d4b477da1a8 b97d64c9 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 18:15 linux-next 8d4b477da1a8 b97d64c9 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 17:37 linux-next 8d4b477da1a8 b97d64c9 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 14:56 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 09:04 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/04 02:44 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/03 08:45 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/03 04:51 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/03 02:40 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 19:45 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 17:50 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 16:17 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 14:28 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 14:15 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 10:58 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 07:12 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 04:38 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/02 01:52 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 21:55 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 20:52 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 13:24 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 12:11 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 05:28 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/08/01 03:14 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/07/31 23:48 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/07/31 23:48 linux-next 8d4b477da1a8 6c236867 .config log report info possible deadlock in br_del_bridge
ci-upstream-linux-next-kasan-gce-root 2021/07/29 03:48 linux-next 5a4cee98ea75 9a4781d4 .config log report info possible deadlock in br_del_bridge
* Struck through repros no longer work on HEAD.