============================================
WARNING: possible recursive locking detected
6.8.0-syzkaller-08073-g480e035fc4c7 #0 Not tainted
--------------------------------------------
udevd/4523 is trying to acquire lock:
ffff888063626da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff888063626da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: hsr_dev_xmit+0x13e/0x1d0 net/hsr/hsr_device.c:229
but task is already holding lock:
ffff88807eb60da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
ffff88807eb60da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: send_hsr_supervision_frame+0x276/0xad0 net/hsr/hsr_device.c:310
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 udevd/4523:
#0: ffff888078392ee0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:803 [inline]
#0: ffff888078392ee0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: open_last_lookups fs/namei.c:3565 [inline]
#0: ffff888078392ee0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: path_openat+0x7c4/0x3240 fs/namei.c:3796
#1: ffffc90000007c00 ((&hsr->announce_timer)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x600 kernel/time/timer.c:1789
#2: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
#2: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
#2: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: hsr_announce+0xa3/0x370 net/hsr/hsr_device.c:387
#3: ffff88807eb60da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline]
#3: ffff88807eb60da0 (&hsr->seqnr_lock){+.-.}-{2:2}, at: send_hsr_supervision_frame+0x276/0xad0 net/hsr/hsr_device.c:310
#4: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
#4: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
#4: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: hsr_forward_skb+0xae/0x2400 net/hsr/hsr_forward.c:614
#5: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#5: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:802 [inline]
#5: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2c4/0x3b10 net/core/dev.c:4260
#6: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline]
#6: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline]
#6: ffffffff8e132020 (rcu_read_lock){....}-{1:2}, at: br_dev_xmit+0x1b9/0x1a10 net/bridge/br_device.c:44
#7: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
#7: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:802 [inline]
#7: ffffffff8e132080 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2c4/0x3b10 net/core/dev.c:4260
stack backtrace:
CPU: 0 PID: 4523 Comm: udevd Not tainted 6.8.0-syzkaller-08073-g480e035fc4c7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
check_deadlock kernel/locking/lockdep.c:3062 [inline]
validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856
__lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754
__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+0x13e/0x1d0 net/hsr/hsr_device.c:229
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
__dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
dev_queue_xmit include/linux/netdevice.h:3091 [inline]
br_dev_queue_push_xmit+0x701/0x8d0 net/bridge/br_forward.c:53
NF_HOOK+0x3a7/0x460 include/linux/netfilter.h:314
br_forward_finish+0xe5/0x140 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+0x118c/0x1a10
__netdev_start_xmit include/linux/netdevice.h:4903 [inline]
netdev_start_xmit include/linux/netdevice.h:4917 [inline]
xmit_one net/core/dev.c:3531 [inline]
dev_hard_start_xmit+0x26a/0x790 net/core/dev.c:3547
__dev_queue_xmit+0x19f4/0x3b10 net/core/dev.c:4335
dev_queue_xmit include/linux/netdevice.h:3091 [inline]
hsr_xmit net/hsr/hsr_forward.c:380 [inline]
hsr_forward_do net/hsr/hsr_forward.c:471 [inline]
hsr_forward_skb+0x183f/0x2400 net/hsr/hsr_forward.c:619
send_hsr_supervision_frame+0x548/0xad0 net/hsr/hsr_device.c:333
hsr_announce+0x1a9/0x370 net/hsr/hsr_device.c:389
call_timer_fn+0x17e/0x600 kernel/time/timer.c:1792
expire_timers kernel/time/timer.c:1843 [inline]
__run_timers kernel/time/timer.c:2408 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2419
run_timer_base kernel/time/timer.c:2428 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2438
__do_softirq+0x2bc/0x943 kernel/softirq.c:554
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633
irq_exit_rcu+0x9/0x30 kernel/softirq.c:645
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:find_stack lib/stackdepot.c:593 [inline]
RIP: 0010:stack_depot_save_flags+0x15f/0x860 lib/stackdepot.c:659
Code: de c1 c3 18 41 29 de 48 8b 05 2d 73 9f 0f 8b 0d 1f 73 9f 0f 44 21 f1 48 c1 e1 04 48 8d 14 08 65 ff 05 ad ba 24 7b 4c 8b 3c 08 <49> 39 d7 8b 6c 24 0c 0f 84 95 00 00 00 45 89 cd eb 0c 4d 8b 3f 49
RSP: 0018:ffffc90003187400 EFLAGS: 00000282
RAX: ffff88823ac00000 RBX: 0000000033eb4c62 RCX: 00000000002f38a0
RDX: ffff88823aef38a0 RSI: 0000000000000001 RDI: 00000000922f4ab0
RBP: 000000000c22e98f R08: ffffc90003187460 R09: 000000000000000b
R10: dffffc0000000000 R11: fffffbfff1f0e59e R12: 0000000000000000
R13: ffff888015aeb8c0 R14: 00000000e9e2f38a R15: ffff88802e6db740
kasan_save_stack mm/kasan/common.c:48 [inline]
kasan_save_track+0x51/0x80 mm/kasan/common.c:68
unpoison_slab_object mm/kasan/common.c:312 [inline]
__kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3798 [inline]
slab_alloc_node mm/slub.c:3845 [inline]
kmem_cache_alloc_lru+0x178/0x350 mm/slub.c:3864
__d_alloc+0x31/0x700 fs/dcache.c:1624
d_alloc fs/dcache.c:1704 [inline]
d_alloc_parallel+0xdf/0x1600 fs/dcache.c:2462
lookup_open fs/namei.c:3422 [inline]
open_last_lookups fs/namei.c:3566 [inline]
path_openat+0x924/0x3240 fs/namei.c:3796
do_filp_open+0x235/0x490 fs/namei.c:3826
do_sys_openat2+0x13e/0x1d0 fs/open.c:1406
do_sys_open fs/open.c:1421 [inline]
__do_sys_openat fs/open.c:1437 [inline]
__se_sys_openat fs/open.c:1432 [inline]
__x64_sys_openat+0x247/0x2a0 fs/open.c:1432
do_syscall_64+0xfb/0x240
entry_SYSCALL_64_after_hwframe+0x6d/0x75
RIP: 0033:0x7f051c9169a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffc48088b10 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f051c9169a4
RDX: 0000000000080000 RSI: 00007ffc48088c48 RDI: 00000000ffffff9c
RBP: 00007ffc48088c48 R08: 0000000000000008 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 000056012a9ccb42 R14: 0000000000000001 R15: 0000000000000000
----------------
Code disassembly (best guess):
0: de c1 faddp %st,%st(1)
2: c3 ret
3: 18 41 29 sbb %al,0x29(%rcx)
6: de 48 8b fimuls -0x75(%rax)
9: 05 2d 73 9f 0f add $0xf9f732d,%eax
e: 8b 0d 1f 73 9f 0f mov 0xf9f731f(%rip),%ecx # 0xf9f7333
14: 44 21 f1 and %r14d,%ecx
17: 48 c1 e1 04 shl $0x4,%rcx
1b: 48 8d 14 08 lea (%rax,%rcx,1),%rdx
1f: 65 ff 05 ad ba 24 7b incl %gs:0x7b24baad(%rip) # 0x7b24bad3
26: 4c 8b 3c 08 mov (%rax,%rcx,1),%r15
* 2a: 49 39 d7 cmp %rdx,%r15 <-- trapping instruction
2d: 8b 6c 24 0c mov 0xc(%rsp),%ebp
31: 0f 84 95 00 00 00 je 0xcc
37: 45 89 cd mov %r9d,%r13d
3a: eb 0c jmp 0x48
3c: 4d 8b 3f mov (%r15),%r15
3f: 49 rex.WB