============================================
WARNING: possible recursive locking detected
6.12.0-syzkaller-09567-g7eef7e306d3c #0 Not tainted
--------------------------------------------
syz.6.3323/19263 is trying to acquire lock:
ffff8880357c8f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff8880357c8f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: hsr_dev_xmit+0x18a/0x210 net/hsr/hsr_device.c:234
but task is already holding lock:
ffff8880273d0f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff8880273d0f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_hsr_supervision_frame+0x27c/0xcc0 net/hsr/hsr_device.c:317
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&hsr->seqnr_lock);
lock(&hsr->seqnr_lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
8 locks held by syz.6.3323/19263:
#0: ffff88802bb20b60 (&mm->mmap_lock){++++}-{4:4}, at: mmap_read_lock include/linux/mmap_lock.h:144 [inline]
#0: ffff88802bb20b60 (&mm->mmap_lock){++++}-{4:4}, at: __mm_populate+0x1b0/0x460 mm/gup.c:2005
#1: ffffc90000007c00 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1790
#2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#2: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: hsr_announce+0xaa/0x3a0 net/hsr/hsr_device.c:406
#3: ffff8880273d0f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#3: ffff8880273d0f30 (&hsr->seqnr_lock){+.-.}-{3:3}, at: send_hsr_supervision_frame+0x27c/0xcc0 net/hsr/hsr_device.c:317
#4: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#4: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#4: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: hsr_forward_skb+0xb6/0x2ac0 net/hsr/hsr_forward.c:723
#5: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#5: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:901 [inline]
#5: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x2f4/0x3f50 net/core/dev.c:4359
#6: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
#6: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
#6: ffffffff8e93c520 (rcu_read_lock){....}-{1:3}, at: br_dev_xmit+0x21d/0x1b40 net/bridge/br_device.c:50
#7: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#7: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: rcu_read_lock_bh include/linux/rcupdate.h:901 [inline]
#7: ffffffff8e93c580 (rcu_read_lock_bh){....}-{1:3}, at: __dev_queue_xmit+0x2f4/0x3f50 net/core/dev.c:4359
stack backtrace:
CPU: 0 UID: 0 PID: 19263 Comm: syz.6.3323 Not tainted 6.12.0-syzkaller-09567-g7eef7e306d3c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037
check_deadlock kernel/locking/lockdep.c:3089 [inline]
validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891
__lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline]
_raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:356 [inline]
hsr_dev_xmit+0x18a/0x210 net/hsr/hsr_device.c:234
__netdev_start_xmit include/linux/netdevice.h:5002 [inline]
netdev_start_xmit include/linux/netdevice.h:5011 [inline]
xmit_one net/core/dev.c:3590 [inline]
dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3606
__dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4434
dev_queue_xmit include/linux/netdevice.h:3168 [inline]
br_dev_queue_push_xmit+0x726/0x900 net/bridge/br_forward.c:53
NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
br_forward_finish+0xd8/0x130 net/bridge/br_forward.c:66
NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
__br_forward+0x489/0x660 net/bridge/br_forward.c:115
deliver_clone net/bridge/br_forward.c:131 [inline]
maybe_deliver+0xb3/0x150 net/bridge/br_forward.c:190
br_flood+0x2e4/0x660 net/bridge/br_forward.c:236
br_dev_xmit+0x1202/0x1b40
__netdev_start_xmit include/linux/netdevice.h:5002 [inline]
netdev_start_xmit include/linux/netdevice.h:5011 [inline]
xmit_one net/core/dev.c:3590 [inline]
dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3606
__dev_queue_xmit+0x1b73/0x3f50 net/core/dev.c:4434
dev_queue_xmit include/linux/netdevice.h:3168 [inline]
hsr_xmit net/hsr/hsr_forward.c:430 [inline]
hsr_forward_do net/hsr/hsr_forward.c:571 [inline]
hsr_forward_skb+0x171c/0x2ac0 net/hsr/hsr_forward.c:728
send_hsr_supervision_frame+0x63b/0xcc0 net/hsr/hsr_device.c:351
hsr_announce+0x1f8/0x3a0 net/hsr/hsr_device.c:408
call_timer_fn+0x18e/0x650 kernel/time/timer.c:1793
expire_timers kernel/time/timer.c:1844 [inline]
__run_timers kernel/time/timer.c:2418 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2430
run_timer_base kernel/time/timer.c:2439 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2449
handle_softirqs+0x2c5/0x980 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf7/0x220 kernel/softirq.c:655
irq_exit_rcu+0x9/0x30 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:try_charge_memcg+0x4e0/0x1150 mm/memcontrol.c:2199
Code: 44 24 18 00 02 00 00 75 1b 80 7c 24 38 00 75 20 e9 90 09 00 00 e8 c0 08 c3 09 f7 44 24 18 00 02 00 00 74 e5 fb 80 7c 24 38 00 <0f> 84 75 09 00 00 e9 06 02 00 00 44 89 fb 48 8b bc 24 80 00 00 00
RSP: 0018:ffffc900046c6de0 EFLAGS: 00000246
RAX: 31c65e858eab9600 RBX: 1ffff920008d8dd6 RCX: ffffffff81718f6a
RDX: dffffc0000000000 RSI: ffffffff8c0ad8a0 RDI: ffffc900046c6eb0
RBP: ffffc900046c6fa0 R08: ffffffff942e98b7 R09: 1ffffffff285d316
R10: dffffc0000000000 R11: fffffbfff285d317 R12: ffff88803597e000
R13: dffffc0000000000 R14: 0000000000000001 R15: 0000000000000040
try_charge mm/memcontrol-v1.h:19 [inline]
charge_memcg+0xa6/0x1e0 mm/memcontrol.c:4497
__mem_cgroup_charge+0x27/0x80 mm/memcontrol.c:4512
mem_cgroup_charge include/linux/memcontrol.h:646 [inline]
shmem_alloc_and_add_folio+0x8a1/0x13d0 mm/shmem.c:1843
shmem_get_folio_gfp+0x5a9/0x20a0 mm/shmem.c:2355
shmem_fault+0x253/0x6f0 mm/shmem.c:2556
__do_fault+0x135/0x460 mm/memory.c:4907
do_read_fault mm/memory.c:5322 [inline]
do_fault mm/memory.c:5456 [inline]
do_pte_missing mm/memory.c:3979 [inline]
handle_pte_fault+0x335a/0x68a0 mm/memory.c:5801
__handle_mm_fault mm/memory.c:5944 [inline]
handle_mm_fault+0x1053/0x1ad0 mm/memory.c:6112
faultin_page mm/gup.c:1187 [inline]
__get_user_pages+0x1c82/0x49e0 mm/gup.c:1485
populate_vma_page_range+0x264/0x330 mm/gup.c:1923
__mm_populate+0x27a/0x460 mm/gup.c:2026
mm_populate include/linux/mm.h:3385 [inline]
vm_mmap_pgoff+0x2c3/0x3d0 mm/util.c:585
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f2fb3380809
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f2fb417e058 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f2fb3545fa0 RCX: 00007f2fb3380809
RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000000020000000
RBP: 00007f2fb33f393e R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f2fb3545fa0 R15: 00007fff3547bac8
----------------
Code disassembly (best guess):
0: 44 24 18 rex.R and $0x18,%al
3: 00 02 add %al,(%rdx)
5: 00 00 add %al,(%rax)
7: 75 1b jne 0x24
9: 80 7c 24 38 00 cmpb $0x0,0x38(%rsp)
e: 75 20 jne 0x30
10: e9 90 09 00 00 jmp 0x9a5
15: e8 c0 08 c3 09 call 0x9c308da
1a: f7 44 24 18 00 02 00 testl $0x200,0x18(%rsp)
21: 00
22: 74 e5 je 0x9
24: fb sti
25: 80 7c 24 38 00 cmpb $0x0,0x38(%rsp)
* 2a: 0f 84 75 09 00 00 je 0x9a5 <-- trapping instruction
30: e9 06 02 00 00 jmp 0x23b
35: 44 89 fb mov %r15d,%ebx
38: 48 8b bc 24 80 00 00 mov 0x80(%rsp),%rdi
3f: 00