============================================
WARNING: possible recursive locking detected
5.16.0-rc8-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.0/12775 is trying to acquire lock:
ffff8880763dd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff8880763dd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_query net/bridge/br_multicast.c:3341 [inline]
ffff8880763dd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_ipv6_rcv net/bridge/br_multicast.c:3737 [inline]
ffff8880763dd3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_rcv+0x16dc/0x6230 net/bridge/br_multicast.c:3792
but task is already holding lock:
ffff88805c99d3b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff88805c99d3b8 (&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
13 locks held by syz-executor.0/12775:
#0: ffff88814b79a460 (sb_writers#5){.+.+}-{0:0}, at: __do_sys_sendfile64 fs/read_write.c:1310 [inline]
#0: ffff88814b79a460 (sb_writers#5){.+.+}-{0:0}, at: __se_sys_sendfile64 fs/read_write.c:1296 [inline]
#0: ffff88814b79a460 (sb_writers#5){.+.+}-{0:0}, at: __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1296
#1: ffff888054df5da8 (&sb->s_type->i_mutex_key#10){++++}-{3:3}, at: inode_lock include/linux/fs.h:783 [inline]
#1: ffff888054df5da8 (&sb->s_type->i_mutex_key#10){++++}-{3:3}, at: ext4_dio_write_iter fs/ext4/file.c:510 [inline]
#1: ffff888054df5da8 (&sb->s_type->i_mutex_key#10){++++}-{3:3}, at: ext4_file_write_iter+0xaeb/0x14e0 fs/ext4/file.c:679
#2: ffff88814b79e990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0xf84/0x1380 fs/jbd2/transaction.c:466
#3: ffff888054df61c0 (&ei->i_es_lock){++++}-{2:2}, at: ext4_es_lookup_extent+0x15e/0xcf0 fs/ext4/extents_status.c:933
#4: ffffc90000007d70 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline]
#4: ffffc90000007d70 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411
#5: ffff88805c99d3b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#5: ffff88805c99d3b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired+0x61/0x360 net/bridge/br_multicast.c:1742
#6: ffffffff8bb83d40 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#7: ffffffff8bb83da0 (rcu_read_lock){....}-{1:2}, at: is_netpoll_tx_blocked include/net/bonding.h:109 [inline]
#7: ffffffff8bb83da0 (rcu_read_lock){....}-{1:2}, at: bond_start_xmit+0x88/0x1220 drivers/net/bonding/bond_main.c:5132
#8: ffffffff8bb83d40 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#9: ffffffff8bb83da0 (rcu_read_lock){....}-{1:2}, at: is_netpoll_tx_blocked include/net/bonding.h:109 [inline]
#9: ffffffff8bb83da0 (rcu_read_lock){....}-{1:2}, at: bond_start_xmit+0x88/0x1220 drivers/net/bonding/bond_main.c:5132
#10: ffffffff8bb83d40 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#11: ffffffff8bb83d40 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#12: ffffffff8bb83da0 (rcu_read_lock){....}-{1:2}, at: br_dev_xmit+0x0/0x16c0 net/bridge/br_device.c:309
stack backtrace:
CPU: 0 PID: 12775 Comm: syz-executor.0 Not tainted 5.16.0-rc8-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
vlan_dev_hard_start_xmit+0x1b3/0x670 net/8021q/vlan_dev.c:124
__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_do_alb_xmit+0x5c1/0x8a0 drivers/net/bonding/bond_alb.c:1325
__bond_start_xmit drivers/net/bonding/bond_main.c:5113 [inline]
bond_start_xmit+0xaad/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
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:__sanitizer_cov_trace_pc+0x4c/0x60 kernel/kcov.c:205
Code: 0e 85 c9 74 35 8b 82 a4 15 00 00 85 c0 74 2b 8b 82 80 15 00 00 83 f8 02 75 20 48 8b 8a 88 15 00 00 8b 92 84 15 00 00 48 8b 01 <48> 83 c0 01 48 39 c2 76 07 48 89 34 c1 48 89 01 c3 0f 1f 00 41 55
RSP: 0018:ffffc90003ec70e0 EFLAGS: 00000246
RAX: 000000000003ffff RBX: c7ffffffffffffff RCX: ffffc90002c91000
RDX: 0000000000040000 RSI: ffffffff820e7a9c RDI: 0000000000000003
RBP: ffff888054c88af0 R08: 0000000000000000 R09: ffff888054df61ab
R10: ffffffff83fac60d R11: 0000000000000001 R12: ffff88814b79c7b0
R13: 0000000000000001 R14: dffffc0000000000 R15: ffff888054c88b0c
ext4_es_lookup_extent+0x49c/0xcf0 fs/ext4/extents_status.c:983
ext4_map_blocks+0x1f1/0x17d0 fs/ext4/inode.c:529
ext4_iomap_alloc fs/ext4/inode.c:3365 [inline]
ext4_iomap_begin+0x463/0x7a0 fs/ext4/inode.c:3415
iomap_iter+0x454/0x1110 fs/iomap/iter.c:74
__iomap_dio_rw+0x6b2/0x1a10 fs/iomap/direct-io.c:588
iomap_dio_rw+0x38/0x90 fs/iomap/direct-io.c:679
ext4_dio_write_iter fs/ext4/file.c:568 [inline]
ext4_file_write_iter+0xe1b/0x14e0 fs/ext4/file.c:679
call_write_iter include/linux/fs.h:2162 [inline]
do_iter_readv_writev+0x472/0x750 fs/read_write.c:725
do_iter_write+0x188/0x710 fs/read_write.c:851
vfs_iter_write+0x70/0xa0 fs/read_write.c:892
iter_file_splice_write+0x723/0xc70 fs/splice.c:689
do_splice_from fs/splice.c:767 [inline]
direct_splice_actor+0x110/0x180 fs/splice.c:936
splice_direct_to_actor+0x34b/0x8c0 fs/splice.c:891
do_splice_direct+0x1b3/0x280 fs/splice.c:979
do_sendfile+0xaf2/0x1250 fs/read_write.c:1245
__do_sys_sendfile64 fs/read_write.c:1310 [inline]
__se_sys_sendfile64 fs/read_write.c:1296 [inline]
__x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1296
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:0x7f40e5c38e99
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:00007f40e45ae168 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f40e5d4bf60 RCX: 00007f40e5c38e99
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007f40e5c92ff1 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000f03b0000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffeaa0e42ef R14: 00007f40e45ae300 R15: 0000000000022000
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 85 c9 test %ecx,%ecx
2: 74 35 je 0x39
4: 8b 82 a4 15 00 00 mov 0x15a4(%rdx),%eax
a: 85 c0 test %eax,%eax
c: 74 2b je 0x39
e: 8b 82 80 15 00 00 mov 0x1580(%rdx),%eax
14: 83 f8 02 cmp $0x2,%eax
17: 75 20 jne 0x39
19: 48 8b 8a 88 15 00 00 mov 0x1588(%rdx),%rcx
20: 8b 92 84 15 00 00 mov 0x1584(%rdx),%edx
26: 48 8b 01 mov (%rcx),%rax
* 29: 48 83 c0 01 add $0x1,%rax <-- trapping instruction
2d: 48 39 c2 cmp %rax,%rdx
30: 76 07 jbe 0x39
32: 48 89 34 c1 mov %rsi,(%rcx,%rax,8)
36: 48 89 01 mov %rax,(%rcx)
39: c3 retq
3a: 0f 1f 00 nopl (%rax)
3d: 41 55 push %r13