[v5.15] possible deadlock in hsr_dev_xmit (2)

0 views
Skip to first unread message

syzbot

unread,
Mar 8, 2025, 12:20:26 AMMar 8
Hello,

syzbot found the following issue on:

HEAD commit: c16c81c81336 Linux 5.15.178
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=165143a8580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3ca28fba9b2e5c5
dashboard link: https://syzkaller.appspot.com/bug?extid=e98fe00f1b0b8f929db5
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3f2947e5e4dc/disk-c16c81c8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7034800fdaa8/vmlinux-c16c81c8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/42337be7c213/Image-c16c81c8.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

============================================
WARNING: possible recursive locking detected
5.15.178-syzkaller #0 Not tainted
--------------------------------------------
syz.1.710/6111 is trying to acquire lock:
ffff0000ce736d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
ffff0000ce736d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222

but task is already holding lock:
ffff0000da0a8d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
ffff0000da0a8d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222

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

11 locks held by syz.1.710/6111:
#0: ffff800008007ba0 ((&ndev->rs_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline]
#0: ffff800008007ba0 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd0/0x8f0 kernel/time/timer.c:1441
#1: ffff800014d42360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311
#2: ffff800014d423c0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311
#3: ffff800014d423c0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311
#4: ffff0000da0a8d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline]
#4: ffff0000da0a8d88 (&hsr->seqnr_lock){+.-.}-{2:2}, at: hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222
#5: ffff800014d42360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311
#6: ffff800014d423c0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311
#7: ffff800014d42360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311
#8: ffff800014d423c0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311
#9: ffff800014d42360 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x10/0x4c include/linux/rcupdate.h:311
#10: ffff800014d423c0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_lock_acquire+0x18/0x54 include/linux/rcupdate.h:311

stack backtrace:
CPU: 0 PID: 6111 Comm: syz.1.710 Not tainted 5.15.178-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
Call trace:
dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x58 lib/dump_stack.c:113
__lock_acquire+0x62bc/0x7638 kernel/locking/lockdep.c:5012
lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623
__raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline]
_raw_spin_lock_bh+0x124/0x1c4 kernel/locking/spinlock.c:178
spin_lock_bh include/linux/spinlock.h:368 [inline]
hsr_dev_xmit+0xf8/0x1d0 net/hsr/hsr_device.c:222
__netdev_start_xmit include/linux/netdevice.h:5019 [inline]
netdev_start_xmit include/linux/netdevice.h:5033 [inline]
xmit_one net/core/dev.c:3617 [inline]
dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633
__dev_queue_xmit+0x1378/0x2ac8 net/core/dev.c:4256
dev_queue_xmit+0x24/0x34 net/core/dev.c:4289
br_dev_queue_push_xmit+0x56c/0x70c net/bridge/br_forward.c:53
NF_HOOK+0x358/0x404 include/linux/netfilter.h:302
br_forward_finish+0x7c/0x90 net/bridge/br_forward.c:66
NF_HOOK+0x358/0x404 include/linux/netfilter.h:302
__br_forward+0x2f0/0x458 net/bridge/br_forward.c:115
deliver_clone net/bridge/br_forward.c:131 [inline]
maybe_deliver+0xc8/0x188 net/bridge/br_forward.c:189
br_flood+0x28c/0x41c net/bridge/br_forward.c:231
br_dev_xmit+0xd04/0x1270
__netdev_start_xmit include/linux/netdevice.h:5019 [inline]
netdev_start_xmit include/linux/netdevice.h:5033 [inline]
xmit_one net/core/dev.c:3617 [inline]
dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633
__dev_queue_xmit+0x1378/0x2ac8 net/core/dev.c:4256
dev_queue_xmit+0x24/0x34 net/core/dev.c:4289
bond_start_xmit+0xdb0/0x1550 drivers/net/bonding/bond_main.c:5164
__netdev_start_xmit include/linux/netdevice.h:5019 [inline]
netdev_start_xmit include/linux/netdevice.h:5033 [inline]
xmit_one net/core/dev.c:3617 [inline]
dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633
__dev_queue_xmit+0x1378/0x2ac8 net/core/dev.c:4256
dev_queue_xmit+0x24/0x34 net/core/dev.c:4289
hsr_xmit net/hsr/hsr_forward.c:338 [inline]
hsr_forward_do net/hsr/hsr_forward.c:429 [inline]
hsr_forward_skb+0xecc/0x161c net/hsr/hsr_forward.c:579
hsr_dev_xmit+0x104/0x1d0 net/hsr/hsr_device.c:223
__netdev_start_xmit include/linux/netdevice.h:5019 [inline]
netdev_start_xmit include/linux/netdevice.h:5033 [inline]
xmit_one net/core/dev.c:3617 [inline]
dev_hard_start_xmit+0x2bc/0x92c net/core/dev.c:3633
__dev_queue_xmit+0x1378/0x2ac8 net/core/dev.c:4256
dev_queue_xmit+0x24/0x34 net/core/dev.c:4289
neigh_connected_output+0x334/0x378 net/core/neighbour.c:1533
neigh_output include/net/neighbour.h:509 [inline]
ip6_finish_output2+0x1360/0x1cec net/ipv6/ip6_output.c:130
__ip6_finish_output+0x580/0x6ec net/ipv6/ip6_output.c:201
ip6_finish_output+0x40/0x218 net/ipv6/ip6_output.c:211
NF_HOOK_COND include/linux/netfilter.h:291 [inline]
ip6_output+0x274/0x594 net/ipv6/ip6_output.c:234
dst_output include/net/dst.h:443 [inline]
NF_HOOK include/linux/netfilter.h:302 [inline]
ndisc_send_skb+0xbf8/0x1788 net/ipv6/ndisc.c:511
ndisc_send_rs+0x494/0x5fc net/ipv6/ndisc.c:705
addrconf_rs_timer+0x308/0x5a8 net/ipv6/addrconf.c:3959
call_timer_fn+0x19c/0x8f0 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x554/0x718 kernel/time/timer.c:1767
run_timer_softirq+0x7c/0x114 kernel/time/timer.c:1780
handle_softirqs+0x384/0xdbc kernel/softirq.c:558
__do_softirq kernel/softirq.c:592 [inline]
do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline]
invoke_softirq kernel/softirq.c:439 [inline]
__irq_exit_rcu+0x268/0x4d8 kernel/softirq.c:641
irq_exit+0x14/0x88 kernel/softirq.c:665
handle_domain_irq+0xf4/0x178 kernel/irq/irqdesc.c:711
gic_handle_irq+0x78/0x1c8 drivers/irqchip/irq-gic-v3.c:765
call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:899
do_interrupt_handler+0x74/0x94 arch/arm64/kernel/entry-common.c:267
el1_interrupt+0x30/0x58 arch/arm64/kernel/entry-common.c:454
el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:470
el1h_64_irq+0x78/0x7c arch/arm64/kernel/entry.S:522
arch_local_irq_restore arch/arm64/include/asm/irqflags.h:122 [inline]
lock_release+0x504/0xa1c kernel/locking/lockdep.c:5646
__might_fault+0xf4/0x128 mm/memory.c:5355
____sys_recvmsg+0x2c4/0x720 net/socket.c:2668
___sys_recvmsg+0x240/0x2cc net/socket.c:2697
do_recvmmsg+0x310/0x9a4 net/socket.c:2791
__sys_recvmmsg net/socket.c:2870 [inline]
__do_sys_recvmmsg net/socket.c:2893 [inline]
__se_sys_recvmmsg net/socket.c:2886 [inline]
__arm64_sys_recvmmsg+0x180/0x23c net/socket.c:2886
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages