============================================
WARNING: possible recursive locking detected
5.16.0-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.3/25458 is trying to acquire lock:
ffff8880791cd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff8880791cd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_query net/bridge/br_multicast.c:3341 [inline]
ffff8880791cd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_ipv6_rcv net/bridge/br_multicast.c:3737 [inline]
ffff8880791cd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_rcv+0x16dc/0x6230 net/bridge/br_multicast.c:3792
but task is already holding lock:
ffff888076da13b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff888076da13b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired+0x61/0x360 net/bridge/br_multicast.c:1742
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&br->multicast_lock);
lock(&br->multicast_lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
7 locks held by syz-executor.3/25458:
#0: ffffffff8d306bd0 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2f5/0x760 net/core/net_namespace.c:468
#1: ffffc90000dc0d70 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline]
#1: ffffc90000dc0d70 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411
#2: ffff888076da13b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#2: ffff888076da13b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired+0x61/0x360 net/bridge/br_multicast.c:1742
#3: ffffffff8bb845c0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#4: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: is_netpoll_tx_blocked include/net/bonding.h:109 [inline]
#4: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: bond_start_xmit+0x88/0x1220 drivers/net/bonding/bond_main.c:5132
#5: ffffffff8bb845c0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#6: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: br_dev_xmit+0x0/0x16c0 net/bridge/br_device.c:309
stack backtrace:
CPU: 1 PID: 25458 Comm: syz-executor.3 Not tainted 5.16.0-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:106
print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
check_deadlock kernel/locking/lockdep.c:2999 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
__lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027
lock_acquire kernel/locking/lockdep.c:5637 [inline]
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:349 [inline]
br_ip6_multicast_query net/bridge/br_multicast.c:3341 [inline]
br_multicast_ipv6_rcv net/bridge/br_multicast.c:3737 [inline]
br_multicast_rcv+0x16dc/0x6230 net/bridge/br_multicast.c:3792
br_dev_xmit+0x6f6/0x16c0 net/bridge/br_device.c:89
__netdev_start_xmit include/linux/netdevice.h:4682 [inline]
netdev_start_xmit include/linux/netdevice.h:4696 [inline]
xmit_one net/core/dev.c:3473 [inline]
dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3489
__dev_queue_xmit+0x2985/0x3660 net/core/dev.c:4116
bond_dev_queue_xmit+0xc3/0x170 drivers/net/bonding/bond_main.c:306
bond_3ad_xor_xmit drivers/net/bonding/bond_main.c:4875 [inline]
__bond_start_xmit drivers/net/bonding/bond_main.c:5109 [inline]
bond_start_xmit+0xb01/0x1220 drivers/net/bonding/bond_main.c:5137
__netdev_start_xmit include/linux/netdevice.h:4682 [inline]
netdev_start_xmit include/linux/netdevice.h:4696 [inline]
xmit_one net/core/dev.c:3473 [inline]
dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3489
__dev_queue_xmit+0x2985/0x3660 net/core/dev.c:4116
br_dev_queue_push_xmit+0x25c/0x740 net/bridge/br_forward.c:53
NF_HOOK include/linux/netfilter.h:307 [inline]
__br_multicast_send_query+0x118d/0x3ab0 net/bridge/br_multicast.c:1646
br_multicast_send_query+0x266/0x4b0 net/bridge/br_multicast.c:1725
br_multicast_port_query_expired+0x2c3/0x360 net/bridge/br_multicast.c:1750
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x67c/0xa30 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:__might_resched+0x1a/0x2c0 kernel/sched/core.c:9493
Code: 80 5b 5d c3 e8 c7 c4 f8 07 0f 1f 80 00 00 00 00 41 56 41 55 41 54 41 89 f4 be ff ff ff ff 55 48 89 fd 48 c7 c7 c0 45 b8 8b 53 <89> d3 e8 3f c8 f8 07 85 c0 0f 85 d3 01 00 00 be ff ff ff ff 48 c7
RSP: 0018:ffffc90006617b70 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 000000000007ffff RCX: 0000000000000000
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: ffffffff8bb845c0
RBP: ffffffff8aba07c0 R08: 000000000007ffff R09: 0000000000000000
R10: ffffffff87aec327 R11: 0000000000000000 R12: 000000000000010b
R13: ffffc90006617d08 R14: 0000000000000002 R15: dffffc0000000000
inet_twsk_purge+0xe8/0x7d0 net/ipv4/inet_timewait_sock.c:267
ops_exit_list+0x10d/0x160 net/core/net_namespace.c:171
setup_net+0x779/0xbb0 net/core/net_namespace.c:351
copy_net_ns+0x318/0x760 net/core/net_namespace.c:472
create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:226
ksys_unshare+0x445/0x920 kernel/fork.c:3075
__do_sys_unshare kernel/fork.c:3146 [inline]
__se_sys_unshare kernel/fork.c:3144 [inline]
__x64_sys_unshare+0x2d/0x40 kernel/fork.c:3144
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:0x7f1e20bcffe9
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:00007f1e1f545168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f1e20ce2f60 RCX: 00007f1e20bcffe9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006c060000
RBP: 00007f1e20c2a08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe3afd0adf R14: 00007f1e1f545300 R15: 0000000000022000
----------------
Code disassembly (best guess):
0: 80 5b 5d c3 sbbb $0xc3,0x5d(%rbx)
4: e8 c7 c4 f8 07 callq 0x7f8c4d0
9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
10: 41 56 push %r14
12: 41 55 push %r13
14: 41 54 push %r12
16: 41 89 f4 mov %esi,%r12d
19: be ff ff ff ff mov $0xffffffff,%esi
1e: 55 push %rbp
1f: 48 89 fd mov %rdi,%rbp
22: 48 c7 c7 c0 45 b8 8b mov $0xffffffff8bb845c0,%rdi
29: 53 push %rbx
* 2a: 89 d3 mov %edx,%ebx <-- trapping instruction
2c: e8 3f c8 f8 07 callq 0x7f8c870
31: 85 c0 test %eax,%eax
33: 0f 85 d3 01 00 00 jne 0x20c
39: be ff ff ff ff mov $0xffffffff,%esi
3e: 48 rex.W
3f: c7 .byte 0xc7