syzbot


possible deadlock in __dev_queue_xmit (2)

Status: upstream: reported on 2024/01/19 16:24
Reported-by: syzbot+c08be6149a3f2c25a94f@syzkaller.appspotmail.com
First crash: 127d, last: 18d
Similar bugs (11)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-49 possible deadlock in __dev_queue_xmit 4 1800d 1869d 0/3 auto-closed as invalid on 2019/10/25 08:36
upstream possible deadlock in __dev_queue_xmit (3) net C done inconclusive 990 7d19h 1636d 0/26 upstream: reported C repro on 2019/12/03 09:55
linux-4.19 possible deadlock in __dev_queue_xmit C error 5 977d 1395d 0/1 upstream: reported C repro on 2020/07/31 07:05
android-414 possible deadlock in __dev_queue_xmit 3 1858d 1869d 0/1 auto-closed as invalid on 2019/10/21 21:31
android-44 possible deadlock in __dev_queue_xmit 14 1635d 1696d 0/2 auto-closed as invalid on 2020/04/02 07:14
linux-6.1 possible deadlock in __dev_queue_xmit 98 219d 333d 0/3 auto-obsoleted due to no activity on 2023/12/28 22:22
linux-4.14 possible deadlock in __dev_queue_xmit 7 1345d 1790d 0/1 auto-closed as invalid on 2021/01/16 21:33
upstream possible deadlock in __dev_queue_xmit net 1 1958d 1957d 0/26 closed as invalid on 2019/03/10 18:51
linux-5.15 possible deadlock in __dev_queue_xmit 113 284d 419d 0/3 auto-obsoleted due to no activity on 2023/10/25 04:56
linux-5.15 possible deadlock in __dev_queue_xmit (2) origin:lts-only C done 12 31d 163d 0/3 upstream: reported C repro on 2023/12/15 02:11
upstream possible deadlock in __dev_queue_xmit (2) kernel 2 1770d 1885d 0/26 auto-closed as invalid on 2019/11/19 09:01

Sample crash report:
============================================
WARNING: possible recursive locking detected
6.1.83-syzkaller #0 Not tainted
--------------------------------------------
syz-executor.0/10461 is trying to acquire lock:
ffff888028a968d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff888028a968d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4304 [inline]
ffff888028a968d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __dev_queue_xmit+0x1846/0x3cf0 net/core/dev.c:4289

but task is already holding lock:
ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4304 [inline]
ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x1c0/0x5e0 net/sched/sch_generic.c:340

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(_xmit_ETHER#2);
  lock(_xmit_ETHER#2);

 *** DEADLOCK ***

 May be due to missing lock nesting notation

6 locks held by syz-executor.0/10461:
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x402/0x1310 net/ipv4/ip_output.c:221
 #1: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
 #1: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:843 [inline]
 #1: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d6/0x3cf0 net/core/dev.c:4216
 #2: ffff88801733b258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline]
 #2: ffff88801733b258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: qdisc_run_begin include/net/sch_generic.h:194 [inline]
 #2: ffff88801733b258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3841 [inline]
 #2: ffff88801733b258 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock){+...}-{2:2}, at: __dev_queue_xmit+0x131b/0x3cf0 net/core/dev.c:4259
 #3: ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #3: ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4304 [inline]
 #3: ffff88807d8ca8d8 (_xmit_ETHER#2){+.-.}-{2:2}, at: sch_direct_xmit+0x1c0/0x5e0 net/sched/sch_generic.c:340
 #4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #4: ffffffff8d12a940 (rcu_read_lock){....}-{1:2}, at: ip_finish_output2+0x402/0x1310 net/ipv4/ip_output.c:221
 #5: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
 #5: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:843 [inline]
 #5: ffffffff8d12a9a0 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d6/0x3cf0 net/core/dev.c:4216

stack backtrace:
CPU: 1 PID: 10461 Comm: syz-executor.0 Not tainted 6.1.83-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline]
 check_deadlock kernel/locking/lockdep.c:3026 [inline]
 validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812
 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049
 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662
 __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:351 [inline]
 __netif_tx_lock include/linux/netdevice.h:4304 [inline]
 __dev_queue_xmit+0x1846/0x3cf0 net/core/dev.c:4289
 neigh_output include/net/neighbour.h:544 [inline]
 ip_finish_output2+0xe35/0x1310 net/ipv4/ip_output.c:228
 iptunnel_xmit+0x513/0x920 net/ipv4/ip_tunnel_core.c:82
 ip_tunnel_xmit+0x22e4/0x2cc0 net/ipv4/ip_tunnel.c:840
 __gre_xmit net/ipv4/ip_gre.c:469 [inline]
 erspan_xmit+0xaa2/0x1530 net/ipv4/ip_gre.c:718
 __netdev_start_xmit include/linux/netdevice.h:4853 [inline]
 netdev_start_xmit include/linux/netdevice.h:4867 [inline]
 xmit_one net/core/dev.c:3627 [inline]
 dev_hard_start_xmit+0x261/0x8c0 net/core/dev.c:3643
 sch_direct_xmit+0x2b2/0x5e0 net/sched/sch_generic.c:342
 __dev_xmit_skb net/core/dev.c:3854 [inline]
 __dev_queue_xmit+0x1ace/0x3cf0 net/core/dev.c:4259
 neigh_output include/net/neighbour.h:544 [inline]
 ip_finish_output2+0xe35/0x1310 net/ipv4/ip_output.c:228
 dst_output include/net/dst.h:444 [inline]
 ip_local_out net/ipv4/ip_output.c:126 [inline]
 ip_send_skb+0x113/0x1a0 net/ipv4/ip_output.c:1596
 udp_send_skb+0xa33/0x1420 net/ipv4/udp.c:981
 udp_sendmsg+0x1d10/0x2ad0 net/ipv4/udp.c:1268
 udpv6_sendmsg+0xd1e/0x30f0 net/ipv6/udp.c:1407
 sock_sendmsg_nosec net/socket.c:718 [inline]
 __sock_sendmsg net/socket.c:730 [inline]
 ____sys_sendmsg+0x5a5/0x8f0 net/socket.c:2514
 ___sys_sendmsg net/socket.c:2568 [inline]
 __sys_sendmmsg+0x3ab/0x730 net/socket.c:2654
 __do_sys_sendmmsg net/socket.c:2683 [inline]
 __se_sys_sendmmsg net/socket.c:2680 [inline]
 __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2680
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fccee87dda9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fccef6da0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fccee9abf80 RCX: 00007fccee87dda9
RDX: 0000000000006c00 RSI: 0000000020007e40 RDI: 0000000000000004
RBP: 00007fccee8ca47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fccee9abf80 R15: 00007ffebd143d28
 </TASK>
netlink: 'syz-executor.0': attribute type 27 has an invalid length.
bridge0: port 2(bridge_slave_1) entered disabled state
bridge0: port 1(bridge_slave_0) entered disabled state
batman_adv: batadv0: Interface deactivated: batadv_slave_0
batman_adv: batadv0: Interface deactivated: batadv_slave_1
netdevsim netdevsim0 netdevsim0: unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim1: unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim2: unset [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim0 netdevsim3: unset [1, 0] type 2 family 0 port 6081 - 0

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/31 15:46 linux-6.1.y e5cd595e23c1 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan possible deadlock in __dev_queue_xmit
2024/05/08 05:44 linux-6.1.y 909ba1f1b414 4cf3f9b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
2024/04/12 15:03 linux-6.1.y bf1e3b1cb1e0 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
2024/04/09 11:18 linux-6.1.y 347385861c50 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
2024/03/14 23:22 linux-6.1.y 61adba85cc40 d615901c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
2024/01/24 13:55 linux-6.1.y 8fd7f4462453 1e153dc8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
2024/01/19 16:23 linux-6.1.y fec3b1451d5f 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 possible deadlock in __dev_queue_xmit
* Struck through repros no longer work on HEAD.