================================ WARNING: inconsistent lock state 5.16.0-rc4-next-20211210-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/22071 [HC0[0]:SC1[7]:HE1:SE0] takes: ffffffff8bca9b40 (fs_reclaim){+.?.}-{0:0}, at: might_alloc include/linux/sched/mm.h:253 [inline] ffffffff8bca9b40 (fs_reclaim){+.?.}-{0:0}, at: slab_pre_alloc_hook mm/slab.h:739 [inline] ffffffff8bca9b40 (fs_reclaim){+.?.}-{0:0}, at: slab_alloc_node mm/slub.c:3145 [inline] ffffffff8bca9b40 (fs_reclaim){+.?.}-{0:0}, at: slab_alloc mm/slub.c:3239 [inline] ffffffff8bca9b40 (fs_reclaim){+.?.}-{0:0}, at: kmem_cache_alloc_trace+0x3b/0x2c0 mm/slub.c:3256 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __fs_reclaim_acquire mm/page_alloc.c:4550 [inline] fs_reclaim_acquire+0x115/0x160 mm/page_alloc.c:4564 might_alloc include/linux/sched/mm.h:253 [inline] slab_pre_alloc_hook mm/slab.h:739 [inline] slab_alloc_node mm/slub.c:3145 [inline] slab_alloc mm/slub.c:3239 [inline] kmem_cache_alloc_trace+0x3b/0x2c0 mm/slub.c:3256 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:715 [inline] alloc_workqueue_attrs+0x38/0x80 kernel/workqueue.c:3405 wq_numa_init kernel/workqueue.c:5972 [inline] workqueue_init+0x12f/0x9e3 kernel/workqueue.c:6099 kernel_init_freeable+0x3fb/0x73a init/main.c:1602 kernel_init+0x1a/0x1d0 init/main.c:1507 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 irq event stamp: 1216 hardirqs last enabled at (1216): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:151 [inline] hardirqs last enabled at (1216): [] _raw_spin_unlock_irqrestore+0x50/0x70 kernel/locking/spinlock.c:194 hardirqs last disabled at (1215): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1215): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (710): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (710): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (1131): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (1131): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(fs_reclaim); lock(fs_reclaim); *** DEADLOCK *** 9 locks held by syz-executor.2/22071: #0: ffff888079ad4028 (&mm->mmap_lock#2){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:136 [inline] #0: ffff888079ad4028 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x285/0x11c0 arch/x86/mm/fault.c:1338 #1: ffffc90000dc0d70 ((&ndev->rs_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #1: ffffc90000dc0d70 ((&ndev->rs_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411 #2: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: ip6_nd_hdr net/ipv6/ndisc.c:466 [inline] #2: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: ndisc_send_skb+0x84b/0x17f0 net/ipv6/ndisc.c:502 #3: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: lwtunnel_xmit_redirect include/net/lwtunnel.h:95 [inline] #3: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x2ad/0x14f0 net/ipv6/ip6_output.c:112 #4: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x1e3/0x3640 net/core/dev.c:4036 #5: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: geneve_xmit+0xde/0x3530 drivers/net/geneve.c:1068 #6: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: ip6_route_output_flags+0x0/0x320 net/ipv6/route.c:778 #7: ffffffff8bb818a0 (rcu_read_lock){....}-{1:2}, at: ip6_pol_route+0x156/0x11e0 net/ipv6/route.c:2217 #8: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: rt6_probe net/ipv6/route.c:632 [inline] #8: ffffffff8bb81840 (rcu_read_lock_bh){....}-{1:2}, at: find_match.part.0+0x35a/0xd00 net/ipv6/route.c:752 stack backtrace: CPU: 1 PID: 22071 Comm: syz-executor.2 Not tainted 5.16.0-rc4-next-20211210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:203 [inline] valid_state kernel/locking/lockdep.c:3945 [inline] mark_lock_irq kernel/locking/lockdep.c:4148 [inline] mark_lock.cold+0x61/0x8e kernel/locking/lockdep.c:4605 mark_usage kernel/locking/lockdep.c:4500 [inline] __lock_acquire+0x11d5/0x54a0 kernel/locking/lockdep.c:4981 lock_acquire kernel/locking/lockdep.c:5639 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 __fs_reclaim_acquire mm/page_alloc.c:4550 [inline] fs_reclaim_acquire+0x115/0x160 mm/page_alloc.c:4564 might_alloc include/linux/sched/mm.h:253 [inline] slab_pre_alloc_hook mm/slab.h:739 [inline] slab_alloc_node mm/slub.c:3145 [inline] slab_alloc mm/slub.c:3239 [inline] kmem_cache_alloc_trace+0x3b/0x2c0 mm/slub.c:3256 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:715 [inline] ref_tracker_alloc+0xe1/0x430 lib/ref_tracker.c:74 netdev_tracker_alloc include/linux/netdevice.h:3860 [inline] dev_hold_track include/linux/netdevice.h:3877 [inline] rt6_probe net/ipv6/route.c:661 [inline] find_match.part.0+0xac9/0xd00 net/ipv6/route.c:752 find_match net/ipv6/route.c:825 [inline] __find_rr_leaf+0x17f/0xd20 net/ipv6/route.c:826 find_rr_leaf net/ipv6/route.c:847 [inline] rt6_select net/ipv6/route.c:891 [inline] fib6_table_lookup+0x649/0xa20 net/ipv6/route.c:2185 ip6_pol_route+0x1c5/0x11e0 net/ipv6/route.c:2221 pol_lookup_func include/net/ip6_fib.h:580 [inline] fib6_rule_lookup+0x52a/0x6f0 net/ipv6/fib6_rules.c:120 ip6_route_output_flags_noref+0x2e2/0x380 net/ipv6/route.c:2629 ip6_route_output_flags+0x72/0x320 net/ipv6/route.c:2642 ip6_route_output include/net/ip6_route.h:98 [inline] ip6_dst_lookup_tail+0x5ab/0x1620 net/ipv6/ip6_output.c:1070 ip6_dst_lookup_flow+0x8c/0x1d0 net/ipv6/ip6_output.c:1200 geneve_get_v6_dst+0x46f/0x9a0 drivers/net/geneve.c:858 geneve6_xmit_skb drivers/net/geneve.c:991 [inline] geneve_xmit+0x520/0x3530 drivers/net/geneve.c:1074 __netdev_start_xmit include/linux/netdevice.h:4685 [inline] netdev_start_xmit include/linux/netdevice.h:4699 [inline] xmit_one net/core/dev.c:3473 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3489 __dev_queue_xmit+0x2983/0x3640 net/core/dev.c:4112 neigh_resolve_output net/core/neighbour.c:1522 [inline] neigh_resolve_output+0x50e/0x820 net/core/neighbour.c:1502 neigh_output include/net/neighbour.h:541 [inline] ip6_finish_output2+0x56e/0x14f0 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x61e/0xe80 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xa99/0x17f0 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:702 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3898 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:49 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 cc cc cc cc cc cc 41 57 41 56 41 55 41 54 55 53 48 89 fb RSP: 0000:ffffc9000289f940 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000840 RDX: ffffea00020a8500 RSI: ffff888000000000 RDI: ffff888082a147c0 RBP: ffffea00020a8000 R08: 0000160000000000 R09: ffffea00020b0000 R10: fffff94000415006 R11: 0000000000000009 R12: 0000000000000009 R13: 00000000013d20ca R14: 0000000000000200 R15: 0000000000000009 clear_page arch/x86/include/asm/page_64.h:50 [inline] clear_highpage include/linux/highmem.h:217 [inline] kernel_init_free_pages mm/page_alloc.c:1288 [inline] kernel_init_free_pages mm/page_alloc.c:1273 [inline] post_alloc_hook+0x265/0x2e0 mm/page_alloc.c:2422 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa72/0x2f40 mm/page_alloc.c:4164 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5376 __alloc_pages_node include/linux/gfp.h:566 [inline] alloc_pages_vma+0x6f7/0x820 mm/mempolicy.c:2213 do_huge_pmd_anonymous_page+0x432/0x1fa0 mm/huge_memory.c:777 create_huge_pmd mm/memory.c:4417 [inline] __handle_mm_fault+0x283d/0x4160 mm/memory.c:4652 handle_mm_fault+0x1c8/0x790 mm/memory.c:4779 do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1484 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1540 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568 RIP: 0033:0x7fc5d443e2b5 Code: 12 80 fa 04 73 1e 80 fa 01 77 26 72 05 0f b6 0e 88 0f c3 48 8b 4c 16 f8 48 8b 36 48 89 4c 17 f8 48 89 37 c3 8b 4c 16 fc 8b 36 <89> 4c 17 fc 89 37 c3 0f b7 4c 16 fe 0f b7 36 66 89 4c 17 fe 66 89 RSP: 002b:00007ffea83646e8 EFLAGS: 00010202 RAX: 0000000020000000 RBX: 0000000000000000 RCX: 00000000dff40202 RDX: 0000000000000005 RSI: 00000000f4020262 RDI: 0000000020000000 RBP: 00007ffea83647a8 R08: 00007fc5d495a000 R09: 00007fc5d455a008 R10: 00007ffea8388090 R11: 000000000002402e R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffea8364990 BUG: sleeping function called from invalid context at include/linux/sched/mm.h:256 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 22071, name: syz-executor.2 preempt_count: 700, expected: 0 RCU nest depth: 4, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:396 [inline] [] __do_softirq+0xe1/0x9c2 kernel/softirq.c:534 CPU: 1 PID: 22071 Comm: syz-executor.2 Not tainted 5.16.0-rc4-next-20211210-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 might_alloc include/linux/sched/mm.h:256 [inline] slab_pre_alloc_hook mm/slab.h:739 [inline] slab_alloc_node mm/slub.c:3145 [inline] slab_alloc mm/slub.c:3239 [inline] kmem_cache_alloc_trace+0x25d/0x2c0 mm/slub.c:3256 kmalloc include/linux/slab.h:581 [inline] kzalloc include/linux/slab.h:715 [inline] ref_tracker_alloc+0xe1/0x430 lib/ref_tracker.c:74 netdev_tracker_alloc include/linux/netdevice.h:3860 [inline] dev_hold_track include/linux/netdevice.h:3877 [inline] rt6_probe net/ipv6/route.c:661 [inline] find_match.part.0+0xac9/0xd00 net/ipv6/route.c:752 find_match net/ipv6/route.c:825 [inline] __find_rr_leaf+0x17f/0xd20 net/ipv6/route.c:826 find_rr_leaf net/ipv6/route.c:847 [inline] rt6_select net/ipv6/route.c:891 [inline] fib6_table_lookup+0x649/0xa20 net/ipv6/route.c:2185 ip6_pol_route+0x1c5/0x11e0 net/ipv6/route.c:2221 pol_lookup_func include/net/ip6_fib.h:580 [inline] fib6_rule_lookup+0x52a/0x6f0 net/ipv6/fib6_rules.c:120 ip6_route_output_flags_noref+0x2e2/0x380 net/ipv6/route.c:2629 ip6_route_output_flags+0x72/0x320 net/ipv6/route.c:2642 ip6_route_output include/net/ip6_route.h:98 [inline] ip6_dst_lookup_tail+0x5ab/0x1620 net/ipv6/ip6_output.c:1070 ip6_dst_lookup_flow+0x8c/0x1d0 net/ipv6/ip6_output.c:1200 geneve_get_v6_dst+0x46f/0x9a0 drivers/net/geneve.c:858 geneve6_xmit_skb drivers/net/geneve.c:991 [inline] geneve_xmit+0x520/0x3530 drivers/net/geneve.c:1074 __netdev_start_xmit include/linux/netdevice.h:4685 [inline] netdev_start_xmit include/linux/netdevice.h:4699 [inline] xmit_one net/core/dev.c:3473 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3489 __dev_queue_xmit+0x2983/0x3640 net/core/dev.c:4112 neigh_resolve_output net/core/neighbour.c:1522 [inline] neigh_resolve_output+0x50e/0x820 net/core/neighbour.c:1502 neigh_output include/net/neighbour.h:541 [inline] ip6_finish_output2+0x56e/0x14f0 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x61e/0xe80 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:451 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xa99/0x17f0 net/ipv6/ndisc.c:508 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:702 addrconf_rs_timer+0x3f2/0x820 net/ipv6/addrconf.c:3898 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:clear_page_erms+0x7/0x10 arch/x86/lib/clear_page_64.S:49 Code: 48 89 47 18 48 89 47 20 48 89 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d9 90 c3 0f 1f 80 00 00 00 00 b9 00 10 00 00 31 c0 aa c3 cc cc cc cc cc cc 41 57 41 56 41 55 41 54 55 53 48 89 fb RSP: 0000:ffffc9000289f940 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000840 RDX: ffffea00020a8500 RSI: ffff888000000000 RDI: ffff888082a147c0 RBP: ffffea00020a8000 R08: 0000160000000000 R09: ffffea00020b0000 R10: fffff94000415006 R11: 0000000000000009 R12: 0000000000000009 R13: 00000000013d20ca R14: 0000000000000200 R15: 0000000000000009 clear_page arch/x86/include/asm/page_64.h:50 [inline] clear_highpage include/linux/highmem.h:217 [inline] kernel_init_free_pages mm/page_alloc.c:1288 [inline] kernel_init_free_pages mm/page_alloc.c:1273 [inline] post_alloc_hook+0x265/0x2e0 mm/page_alloc.c:2422 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa72/0x2f40 mm/page_alloc.c:4164 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5376 __alloc_pages_node include/linux/gfp.h:566 [inline] alloc_pages_vma+0x6f7/0x820 mm/mempolicy.c:2213 do_huge_pmd_anonymous_page+0x432/0x1fa0 mm/huge_memory.c:777 create_huge_pmd mm/memory.c:4417 [inline] __handle_mm_fault+0x283d/0x4160 mm/memory.c:4652 handle_mm_fault+0x1c8/0x790 mm/memory.c:4779 do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397 handle_page_fault arch/x86/mm/fault.c:1484 [inline] exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1540 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568 RIP: 0033:0x7fc5d443e2b5 Code: 12 80 fa 04 73 1e 80 fa 01 77 26 72 05 0f b6 0e 88 0f c3 48 8b 4c 16 f8 48 8b 36 48 89 4c 17 f8 48 89 37 c3 8b 4c 16 fc 8b 36 <89> 4c 17 fc 89 37 c3 0f b7 4c 16 fe 0f b7 36 66 89 4c 17 fe 66 89 RSP: 002b:00007ffea83646e8 EFLAGS: 00010202 RAX: 0000000020000000 RBX: 0000000000000000 RCX: 00000000dff40202 RDX: 0000000000000005 RSI: 00000000f4020262 RDI: 0000000020000000 RBP: 00007ffea83647a8 R08: 00007fc5d495a000 R09: 00007fc5d455a008 R10: 00007ffea8388090 R11: 000000000002402e R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: 00007ffea8364990 ---------------- Code disassembly (best guess): 0: 48 89 47 18 mov %rax,0x18(%rdi) 4: 48 89 47 20 mov %rax,0x20(%rdi) 8: 48 89 47 28 mov %rax,0x28(%rdi) c: 48 89 47 30 mov %rax,0x30(%rdi) 10: 48 89 47 38 mov %rax,0x38(%rdi) 14: 48 8d 7f 40 lea 0x40(%rdi),%rdi 18: 75 d9 jne 0xfffffff3 1a: 90 nop 1b: c3 retq 1c: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 23: b9 00 10 00 00 mov $0x1000,%ecx 28: 31 c0 xor %eax,%eax * 2a: f3 aa rep stos %al,%es:(%rdi) <-- trapping instruction 2c: c3 retq 2d: cc int3 2e: cc int3 2f: cc int3 30: cc int3 31: cc int3 32: cc int3 33: 41 57 push %r15 35: 41 56 push %r14 37: 41 55 push %r13 39: 41 54 push %r12 3b: 55 push %rbp 3c: 53 push %rbx 3d: 48 89 fb mov %rdi,%rbx