============================================
WARNING: possible recursive locking detected
5.16.0-syzkaller #0 Not tainted
--------------------------------------------
kworker/u4:1/30382 is trying to acquire lock:
ffff88807bcf93b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff88807bcf93b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_ip6_multicast_query net/bridge/br_multicast.c:3341 [inline]
ffff88807bcf93b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_ipv6_rcv net/bridge/br_multicast.c:3737 [inline]
ffff88807bcf93b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_rcv+0x16dc/0x6230 net/bridge/br_multicast.c:3792
but task is already holding lock:
ffff8880734093b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
ffff8880734093b8 (&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
8 locks held by kworker/u4:1/30382:
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline]
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline]
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1198 [inline]
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:635 [inline]
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:662 [inline]
#0: ffff888023066938 ((wq_completion)bat_events){+.+.}-{0:0}, at: process_one_work+0x896/0x1660 kernel/workqueue.c:2269
#1: ffffc90003dc7db0 ((work_completion)(&(&bat_priv->nc.work)->work)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1660 kernel/workqueue.c:2273
#2: ffffc90000007d90 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline]
#2: ffffc90000007d90 ((&pmctx->ip6_own_query.timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411
#3: ffff8880734093b8 (&br->multicast_lock){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline]
#3: ffff8880734093b8 (&br->multicast_lock){+.-.}-{2:2}, at: br_multicast_port_query_expired+0x61/0x360 net/bridge/br_multicast.c:1742
#4: ffffffff8bb845c0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#5: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: is_netpoll_tx_blocked include/net/bonding.h:109 [inline]
#5: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: bond_start_xmit+0x88/0x1220 drivers/net/bonding/bond_main.c:5132
#6: ffffffff8bb845c0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3660 net/core/dev.c:4040
#7: ffffffff8bb84620 (rcu_read_lock){....}-{1:2}, at: br_dev_xmit+0x0/0x16c0 net/bridge/br_device.c:309
stack backtrace:
CPU: 0 PID: 30382 Comm: kworker/u4:1 Not tainted 5.16.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: bat_events batadv_nc_worker
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
do_softirq.part.0+0xde/0x130 kernel/softirq.c:459
do_softirq kernel/softirq.c:451 [inline]
__local_bh_enable_ip+0x102/0x120 kernel/softirq.c:383
spin_unlock_bh include/linux/spinlock.h:394 [inline]
batadv_nc_purge_paths+0x2a5/0x3a0 net/batman-adv/network-coding.c:471
batadv_nc_worker+0x8f9/0xfa0 net/batman-adv/network-coding.c:720
process_one_work+0x9b2/0x1660 kernel/workqueue.c:2298
worker_thread+0x65d/0x1130 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295