====================================================== WARNING: possible circular locking dependency detected 5.14.0-rc3-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/23617 is trying to acquire lock: ffffffff8d0a8b68 (br_ioctl_mutex){+.+.}-{3:3}, at: br_ioctl_call+0x3b/0xa0 net/socket.c:1090 but task is already holding lock: ffffffff8d0cad28 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x1a7/0xee0 net/core/dev_ioctl.c:579 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:959 [inline] __mutex_lock+0x12a/0x10a0 kernel/locking/mutex.c:1104 register_netdev+0x11/0x50 net/core/dev.c:10489 br_add_bridge+0x97/0xf0 net/bridge/br_if.c:459 old_deviceless net/bridge/br_ioctl.c:360 [inline] br_ioctl_stub+0x782/0x7f0 net/bridge/br_ioctl.c:375 br_ioctl_call+0x5e/0xa0 net/socket.c:1092 sock_ioctl+0x30c/0x640 net/socket.c:1186 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 (br_ioctl_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_ioctl_call+0x3b/0xa0 net/socket.c:1090 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:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 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(rtnl_mutex); lock(br_ioctl_mutex); lock(rtnl_mutex); lock(br_ioctl_mutex); *** DEADLOCK *** 1 lock held by syz-executor.5/23617: #0: ffffffff8d0cad28 (rtnl_mutex){+.+.}-{3:3}, at: dev_ioctl+0x1a7/0xee0 net/core/dev_ioctl.c:579 stack backtrace: CPU: 0 PID: 23617 Comm: syz-executor.5 Not tainted 5.14.0-rc3-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_ioctl_call+0x3b/0xa0 net/socket.c:1090 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:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 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:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f11ce415188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 00000000200001c0 RSI: 00000000000089a2 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff09bcc6af R14: 00007f11ce415300 R15: 0000000000022000 general protection fault, probably for non-canonical address 0xdffffc00200000b2: 0000 [#1] PREEMPT SMP KASAN KASAN: probably user-memory-access in range [0x0000000100000590-0x0000000100000597] CPU: 0 PID: 23617 Comm: syz-executor.5 Not tainted 5.14.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:read_pnet include/net/net_namespace.h:329 [inline] RIP: 0010:dev_net include/linux/netdevice.h:2434 [inline] RIP: 0010:add_del_if+0x57/0x140 net/bridge/br_ioctl.c:85 Code: 03 80 3c 02 00 0f 85 fd 00 00 00 48 8b 9d 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 98 05 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 00 00 00 4c 8b ab 98 05 00 00 48 b8 00 00 00 RSP: 0018:ffffc9000179fa80 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 00000000ffffffff RCX: ffffc90014f3a000 RDX: 00000000200000b2 RSI: ffffffff87f72856 RDI: 0000000100000597 RBP: ffff8880695b4c00 R08: 00000000000089a2 R09: ffffffff87f73fd6 R10: ffffffff87f740d1 R11: 00000000000089a2 R12: 0000000000000001 R13: ffffc9000179fd60 R14: 0000000020000100 R15: dffffc0000000000 FS: 00007f11ce415700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2de22000 CR3: 0000000064bd7000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600 Call Trace: br_ioctl_stub+0x1c6/0x7f0 net/bridge/br_ioctl.c:397 br_ioctl_call+0x5e/0xa0 net/socket.c:1092 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:1129 sock_ioctl+0x2f1/0x640 net/socket.c:1232 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:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f11ce415188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 00000000200001c0 RSI: 00000000000089a2 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff09bcc6af R14: 00007f11ce415300 R15: 0000000000022000 Modules linked in: ---[ end trace d400feda9db349bf ]--- RIP: 0010:read_pnet include/net/net_namespace.h:329 [inline] RIP: 0010:dev_net include/linux/netdevice.h:2434 [inline] RIP: 0010:add_del_if+0x57/0x140 net/bridge/br_ioctl.c:85 Code: 03 80 3c 02 00 0f 85 fd 00 00 00 48 8b 9d 88 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 8d bb 98 05 00 00 48 89 fa 48 c1 ea 03 <80> 3c 02 00 0f 85 ca 00 00 00 4c 8b ab 98 05 00 00 48 b8 00 00 00 RSP: 0018:ffffc9000179fa80 EFLAGS: 00010207 RAX: dffffc0000000000 RBX: 00000000ffffffff RCX: ffffc90014f3a000 RDX: 00000000200000b2 RSI: ffffffff87f72856 RDI: 0000000100000597 RBP: ffff8880695b4c00 R08: 00000000000089a2 R09: ffffffff87f73fd6 R10: ffffffff87f740d1 R11: 00000000000089a2 R12: 0000000000000001 R13: ffffc9000179fd60 R14: 0000000020000100 R15: dffffc0000000000 FS: 00007f11ce415700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b33522000 CR3: 0000000064bd7000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400