====================================================== WARNING: possible circular locking dependency detected 6.9.0-rc6-syzkaller-00109-ge0863634bf9f #0 Not tainted ------------------------------------------------------ syz-executor.3/8257 is trying to acquire lock: ffff88805dc51218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff88805dc51218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+.-.}-{2:2}, at: __dev_xmit_skb net/core/dev.c:3794 [inline] ffff88805dc51218 (dev->qdisc_tx_busylock ?: &qdisc_tx_busylock#2){+.-.}-{2:2}, at: __dev_queue_xmit+0x229a/0x3ca0 net/core/dev.c:4307 but task is already holding lock: ffff88802262a4d8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff88802262a4d8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4371 [inline] ffff88802262a4d8 (&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:4371 [inline] sch_direct_xmit+0x1c4/0x5f0 net/sched/sch_generic.c:341 __dev_xmit_skb net/core/dev.c:3760 [inline] __dev_queue_xmit+0x19eb/0x3ca0 net/core/dev.c:4307 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:3267 [inline] process_scheduled_works+0xa10/0x17c0 kernel/workqueue.c:3348 worker_thread+0x86d/0xd70 kernel/workqueue.c:3429 kthread+0x2f0/0x390 kernel/kthread.c:388 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+0x18cb/0x58e0 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:3794 [inline] __dev_queue_xmit+0x229a/0x3ca0 net/core/dev.c:4307 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:1075 [inline] __neigh_event_send+0xec8/0x15a0 net/core/neighbour.c:1242 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:1547 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:2797 ip_tunnel_xmit+0x162b/0x2940 net/ipv4/ip_tunnel.c:863 erspan_xmit+0xa18/0x1500 net/ipv4/ip_gre.c:725 __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+0x27a/0x7e0 net/core/dev.c:3547 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 qdisc_run+0xda/0x270 include/net/pkt_sched.h:127 net_tx_action+0x89c/0xa50 net/core/dev.c:5206 __do_softirq+0x2c6/0x980 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 orc_find arch/x86/kernel/unwind_orc.c:211 [inline] unwind_next_frame+0x237/0x2a00 arch/x86/kernel/unwind_orc.c:494 arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 tomoyo_realpath_from_path+0x5a9/0x5e0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x255/0x500 security/tomoyo/file.c:771 security_file_open+0x69/0x570 security/security.c:2961 do_dentry_open+0x327/0x15a0 fs/open.c:942 do_open fs/namei.c:3642 [inline] path_openat+0x2860/0x3240 fs/namei.c:3799 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_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 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 *** 9 locks held by syz-executor.3/8257: #0: ffffffff8e9b3e90 (tomoyo_ss){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #0: ffffffff8e9b3e90 (tomoyo_ss){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #0: ffffffff8e9b3e90 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_read_lock security/tomoyo/common.h:1108 [inline] #0: ffffffff8e9b3e90 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_check_open_permission+0x204/0x500 security/tomoyo/file.c:767 #1: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: net_tx_action+0x708/0xa50 net/core/dev.c:5175 #2: ffff88802262a4d8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88802262a4d8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: __netif_tx_lock include/linux/netdevice.h:4371 [inline] #2: ffff88802262a4d8 (&qdisc_xmit_lock_key#3){+.-.}-{2:2}, at: sch_direct_xmit+0x1c4/0x5f0 net/sched/sch_generic.c:341 #3: ffff88802a430918 (k-slock-AF_INET6){+.-.}-{2:2}, at: spin_trylock include/linux/spinlock.h:361 [inline] #3: ffff88802a430918 (k-slock-AF_INET6){+.-.}-{2:2}, at: icmpv6_xmit_lock net/ipv6/icmp.c:108 [inline] #3: ffff88802a430918 (k-slock-AF_INET6){+.-.}-{2:2}, at: icmp6_send+0xc45/0x2070 net/ipv6/icmp.c:545 #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline] #4: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: icmp6_send+0xba4/0x2070 net/ipv6/icmp.c:537 #5: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #5: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #5: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x712/0x1670 net/ipv6/ip6_output.c:122 #6: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #6: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #6: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: ip6_nd_hdr net/ipv6/ndisc.c:452 [inline] #6: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x572/0x1380 net/ipv6/ndisc.c:503 #7: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #7: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #7: ffffffff8e334da0 (rcu_read_lock){....}-{1:2}, at: ip6_finish_output2+0x712/0x1670 net/ipv6/ip6_output.c:122 #8: ffffffff8e334e00 (rcu_read_lock_bh){....}-{1:2}, at: local_bh_disable include/linux/bottom_half.h:20 [inline] #8: ffffffff8e334e00 (rcu_read_lock_bh){....}-{1:2}, at: rcu_read_lock_bh include/linux/rcupdate.h:833 [inline] #8: ffffffff8e334e00 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x2c7/0x3ca0 net/core/dev.c:4266 stack backtrace: CPU: 1 PID: 8257 Comm: syz-executor.3 Not tainted 6.9.0-rc6-syzkaller-00109-ge0863634bf9f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: <IRQ> __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+0x18cb/0x58e0 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:3794 [inline] __dev_queue_xmit+0x229a/0x3ca0 net/core/dev.c:4307 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:1075 [inline] __neigh_event_send+0xec8/0x15a0 net/core/neighbour.c:1242 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:1547 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:2797 ip_tunnel_xmit+0x162b/0x2940 net/ipv4/ip_tunnel.c:863 erspan_xmit+0xa18/0x1500 net/ipv4/ip_gre.c:725 __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+0x27a/0x7e0 net/core/dev.c:3547 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 qdisc_run+0xda/0x270 include/net/pkt_sched.h:127 net_tx_action+0x89c/0xa50 net/core/dev.c:5206 __do_softirq+0x2c6/0x980 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 </IRQ> <TASK> asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:211 [inline] RIP: 0010:unwind_next_frame+0x237/0x2a00 arch/x86/kernel/unwind_orc.c:494 Code: 48 29 c5 48 c1 ed 08 48 c7 c0 5c 48 ce 90 48 c7 c1 60 48 f9 90 48 29 c1 48 c1 e9 02 45 31 ed 80 3d dd ad 93 0c 00 44 0f 45 e9 <41> 8d 5d ff 89 df 89 ee e8 cc c0 54 00 39 eb 0f 86 02 1e 00 00 89 RSP: 0018:ffffc9001556f008 EFLAGS: 00000202 RAX: ffffffff90ce485c RBX: ffffffff81000000 RCX: 00000000000ac001 RDX: ffffc9001556f115 RSI: ffffffff8bc00000 RDI: ffffffff81fa81ee RBP: 000000000000fa81 R08: ffffffff8141515f R09: ffffc9001556f1d0 R10: 0000000000000003 R11: ffffffff8181f000 R12: ffffc9001556f0e0 R13: 00000000000ac001 R14: ffffffff8bc00000 R15: ffffffff81fa81ef arch_stack_walk+0x151/0x1b0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 tomoyo_realpath_from_path+0x5a9/0x5e0 security/tomoyo/realpath.c:286 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x255/0x500 security/tomoyo/file.c:771 security_file_open+0x69/0x570 security/security.c:2961 do_dentry_open+0x327/0x15a0 fs/open.c:942 do_open fs/namei.c:3642 [inline] path_openat+0x2860/0x3240 fs/namei.c:3799 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_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f6d0067c8a0 Code: 48 89 44 24 20 75 93 44 89 54 24 0c e8 09 82 02 00 44 8b 54 24 0c 89 da 48 89 ee 41 89 c0 bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 77 38 44 89 c7 89 44 24 0c e8 5c 82 02 00 8b 44 RSP: 002b:00007ffcb5031650 EFLAGS: 00000293 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f6d0067c8a0 RDX: 0000000000000002 RSI: 00007ffcb5031790 RDI: 00000000ffffff9c RBP: 00007ffcb5031790 R08: 0000000000000000 R09: 00007ffcb5031417 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032 R13: 000000000003f88a R14: 000000000003f848 R15: 000000000000000a </TASK> ---------------- Code disassembly (best guess): 0: 48 29 c5 sub %rax,%rbp 3: 48 c1 ed 08 shr $0x8,%rbp 7: 48 c7 c0 5c 48 ce 90 mov $0xffffffff90ce485c,%rax e: 48 c7 c1 60 48 f9 90 mov $0xffffffff90f94860,%rcx 15: 48 29 c1 sub %rax,%rcx 18: 48 c1 e9 02 shr $0x2,%rcx 1c: 45 31 ed xor %r13d,%r13d 1f: 80 3d dd ad 93 0c 00 cmpb $0x0,0xc93addd(%rip) # 0xc93ae03 26: 44 0f 45 e9 cmovne %ecx,%r13d * 2a: 41 8d 5d ff lea -0x1(%r13),%ebx <-- trapping instruction 2e: 89 df mov %ebx,%edi 30: 89 ee mov %ebp,%esi 32: e8 cc c0 54 00 call 0x54c103 37: 39 eb cmp %ebp,%ebx 39: 0f 86 02 1e 00 00 jbe 0x1e41 3f: 89 .byte 0x89