netlink: 8 bytes leftover after parsing attributes in process `syz.2.1431'.
======================================================
WARNING: possible circular locking dependency detected
6.10.0-rc6-syzkaller-00177-ge1533b6319ab #0 Not tainted
------------------------------------------------------
syz.2.1431/9181 is trying to acquire lock:
ffff888011ec8218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff888011ec8218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3841 [inline]
ffff888011ec8218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}, at: __dev_queue_xmit+0x22f5/0x3d30 net/core/dev.c:4359

but task is already holding lock:
ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline]
ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: sch_direct_xmit+0x1c4/0x5f0 net/sched/sch_generic.c:341

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
       __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
       _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
       spin_lock include/linux/spinlock.h:351 [inline]
       __netif_tx_lock include/linux/netdevice.h:4347 [inline]
       sch_direct_xmit+0x1c4/0x5f0 net/sched/sch_generic.c:341
       __dev_xmit_skb net/core/dev.c:3807 [inline]
       __dev_queue_xmit+0x1a24/0x3d30 net/core/dev.c:4359
       neigh_output include/net/neighbour.h:542 [inline]
       ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
       ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
       NF_HOOK+0x9e/0x430 include/linux/netfilter.h:314
       mld_sendpack+0x838/0xda0 net/ipv6/mcast.c:1818
       mld_send_cr net/ipv6/mcast.c:2119 [inline]
       mld_ifc_work+0x7d6/0xd90 net/ipv6/mcast.c:2650
       process_one_work kernel/workqueue.c:3248 [inline]
       process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329
       worker_thread+0x86d/0xd50 kernel/workqueue.c:3409
       kthread+0x2f0/0x390 kernel/kthread.c:389
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

-> #0 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+...}-{2:2}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869
       __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
       __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
       _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
       spin_lock include/linux/spinlock.h:351 [inline]
       __dev_xmit_skb net/core/dev.c:3841 [inline]
       __dev_queue_xmit+0x22f5/0x3d30 net/core/dev.c:4359
       neigh_output include/net/neighbour.h:542 [inline]
       ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
       ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
       NF_HOOK include/linux/netfilter.h:314 [inline]
       ndisc_send_skb+0xab0/0x1380 net/ipv6/ndisc.c:509
       ndisc_solicit+0x493/0x6a0
       neigh_probe net/core/neighbour.c:1077 [inline]
       __neigh_event_send+0xec8/0x15a0 net/core/neighbour.c:1244
       neigh_event_send_probe include/net/neighbour.h:466 [inline]
       neigh_event_send include/net/neighbour.h:472 [inline]
       neigh_resolve_output+0x1b5/0x740 net/core/neighbour.c:1549
       neigh_output include/net/neighbour.h:542 [inline]
       ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
       ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
       ip6_send_skb+0x112/0x230 net/ipv6/ip6_output.c:1955
       icmp6_send+0x15fc/0x2070 net/ipv6/icmp.c:624
       __icmpv6_send include/linux/icmpv6.h:28 [inline]
       icmpv6_send include/linux/icmpv6.h:49 [inline]
       ip6_link_failure+0x3c/0x4f0 net/ipv6/route.c:2801
       ip_tunnel_xmit+0x164f/0x2940 net/ipv4/ip_tunnel.c:863
       __gre_xmit+0x1cf/0x260 net/ipv4/ip_gre.c:483
       erspan_xmit+0xaba/0x1310 net/ipv4/ip_gre.c:742
       __netdev_start_xmit include/linux/netdevice.h:4882 [inline]
       netdev_start_xmit include/linux/netdevice.h:4896 [inline]
       xmit_one net/core/dev.c:3578 [inline]
       dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3594
       sch_direct_xmit+0x2b6/0x5f0 net/sched/sch_generic.c:343
       qdisc_restart net/sched/sch_generic.c:408 [inline]
       __qdisc_run+0xbfd/0x2170 net/sched/sch_generic.c:416
       __dev_xmit_skb net/core/dev.c:3876 [inline]
       __dev_queue_xmit+0x14f0/0x3d30 net/core/dev.c:4359
       neigh_output include/net/neighbour.h:542 [inline]
       ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
       ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
       NF_HOOK include/linux/netfilter.h:314 [inline]
       rawv6_send_hdrinc+0xb79/0x1610 net/ipv6/raw.c:661
       rawv6_sendmsg+0x1962/0x23c0 net/ipv6/raw.c:914
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg+0x1a6/0x270 net/socket.c:745
       ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585
       ___sys_sendmsg net/socket.c:2639 [inline]
       __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2668
       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

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&qdisc_xmit_lock_key#3);
                               lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2);
                               lock(&qdisc_xmit_lock_key#3);
  lock(dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2);

 *** DEADLOCK ***

10 locks held by syz.2.1431/9181:
 #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #0: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rawv6_send_hdrinc+0x9df/0x1610 net/ipv6/raw.c:659
 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #1: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x712/0x1670 net/ipv6/ip6_output.c:122
 #2: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
 #2: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:833 [inline]
 #2: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d2/0x3d30 net/core/dev.c:4318
 #3: ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline]
 #3: ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4347 [inline]
 #3: ffff888063c5ecd8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: sch_direct_xmit+0x1c4/0x5f0 net/sched/sch_generic.c:341
 #4: ffff88802aa381d8 (k-slock-AF_INET6){+.-.}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline]
 #4: ffff88802aa381d8 (k-slock-AF_INET6){+.-.}-{2:2}, at: icmpv6_xmit_lock net/ipv6/icmp.c:108 [inline]
 #4: ffff88802aa381d8 (k-slock-AF_INET6){+.-.}-{2:2}, at: icmp6_send+0xc45/0x2070 net/ipv6/icmp.c:545
 #5: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
 #5: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: icmp6_send+0xba4/0x2070 net/ipv6/icmp.c:537
 #6: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #6: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #6: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x712/0x1670 net/ipv6/ip6_output.c:122
 #7: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #7: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #7: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: ip6_nd_hdr net/ipv6/ndisc.c:452 [inline]
 #7: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x572/0x1380 net/ipv6/ndisc.c:503
 #8: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #8: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #8: ffffffff8e333f20 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x712/0x1670 net/ipv6/ip6_output.c:122
 #9: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline]
 #9: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:833 [inline]
 #9: ffffffff8e333f80 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2d2/0x3d30 net/core/dev.c:4318

stack backtrace:
CPU: 0 PID: 9181 Comm: syz.2.1431 Not tainted 6.10.0-rc6-syzkaller-00177-ge1533b6319ab #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3869
 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754
 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
 _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 __dev_xmit_skb net/core/dev.c:3841 [inline]
 __dev_queue_xmit+0x22f5/0x3d30 net/core/dev.c:4359
 neigh_output include/net/neighbour.h:542 [inline]
 ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
 ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
 NF_HOOK include/linux/netfilter.h:314 [inline]
 ndisc_send_skb+0xab0/0x1380 net/ipv6/ndisc.c:509
 ndisc_solicit+0x493/0x6a0
 neigh_probe net/core/neighbour.c:1077 [inline]
 __neigh_event_send+0xec8/0x15a0 net/core/neighbour.c:1244
 neigh_event_send_probe include/net/neighbour.h:466 [inline]
 neigh_event_send include/net/neighbour.h:472 [inline]
 neigh_resolve_output+0x1b5/0x740 net/core/neighbour.c:1549
 neigh_output include/net/neighbour.h:542 [inline]
 ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
 ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
 ip6_send_skb+0x112/0x230 net/ipv6/ip6_output.c:1955
 icmp6_send+0x15fc/0x2070 net/ipv6/icmp.c:624
 __icmpv6_send include/linux/icmpv6.h:28 [inline]
 icmpv6_send include/linux/icmpv6.h:49 [inline]
 ip6_link_failure+0x3c/0x4f0 net/ipv6/route.c:2801
 ip_tunnel_xmit+0x164f/0x2940 net/ipv4/ip_tunnel.c:863
 __gre_xmit+0x1cf/0x260 net/ipv4/ip_gre.c:483
 erspan_xmit+0xaba/0x1310 net/ipv4/ip_gre.c:742
 __netdev_start_xmit include/linux/netdevice.h:4882 [inline]
 netdev_start_xmit include/linux/netdevice.h:4896 [inline]
 xmit_one net/core/dev.c:3578 [inline]
 dev_hard_start_xmit+0x27a/0x7e0 net/core/dev.c:3594
 sch_direct_xmit+0x2b6/0x5f0 net/sched/sch_generic.c:343
 qdisc_restart net/sched/sch_generic.c:408 [inline]
 __qdisc_run+0xbfd/0x2170 net/sched/sch_generic.c:416
 __dev_xmit_skb net/core/dev.c:3876 [inline]
 __dev_queue_xmit+0x14f0/0x3d30 net/core/dev.c:4359
 neigh_output include/net/neighbour.h:542 [inline]
 ip6_finish_output2+0xff8/0x1670 net/ipv6/ip6_output.c:137
 ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
 NF_HOOK include/linux/netfilter.h:314 [inline]
 rawv6_send_hdrinc+0xb79/0x1610 net/ipv6/raw.c:661
 rawv6_sendmsg+0x1962/0x23c0 net/ipv6/raw.c:914
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x1a6/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2585
 ___sys_sendmsg net/socket.c:2639 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2668
 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:0x7f07c2d75bd9
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:00007f07c3c33048 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f07c2f03f60 RCX: 00007f07c2d75bd9
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 000000000000000a
RBP: 00007f07c2de4e60 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f07c2f03f60 R15: 00007ffc8ea2a428
 </TASK>
syz.2.1431 (9181) used greatest stack depth: 17680 bytes left