================================ WARNING: inconsistent lock state 6.10.0-syzkaller-09703-gd7e78951a8b8 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor/5098 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff8880b9438798 (lock#10){+.?.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438798 (lock#10){+.?.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x8f/0x630 mm/mmap_lock.c:237 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:164 [inline] get_mmap_lock_carefully mm/memory.c:5716 [inline] lock_mm_and_find_vma+0x213/0x2f0 mm/memory.c:5776 do_user_addr_fault arch/x86/mm/fault.c:1361 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x1bf/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 fault_in_readable+0x165/0x2b0 fault_in_iov_iter_readable+0x229/0x280 lib/iov_iter.c:94 generic_perform_write+0x29f/0x840 mm/filemap.c:4009 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2930 new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa72/0xc90 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 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 irq event stamp: 523347 hardirqs last enabled at (523346): [] handle_softirqs+0x1d7/0x970 kernel/softirq.c:538 hardirqs last disabled at (523347): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (523347): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (522478): [] tcp_close+0x30/0x110 net/ipv4/tcp.c:2963 softirqs last disabled at (523345): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (523345): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (523345): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 7 locks held by syz-executor/5098: #0: ffffffff8e3e4310 (dup_mmap_sem){.+.+}-{0:0}, at: dup_mmap kernel/fork.c:633 [inline] #0: ffffffff8e3e4310 (dup_mmap_sem){.+.+}-{0:0}, at: dup_mm kernel/fork.c:1671 [inline] #0: ffffffff8e3e4310 (dup_mmap_sem){.+.+}-{0:0}, at: copy_mm+0x277/0x1f30 kernel/fork.c:1720 #1: ffff888045dbcd98 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock_killable include/linux/mmap_lock.h:122 [inline] #1: ffff888045dbcd98 (&mm->mmap_lock){++++}-{3:3}, at: dup_mmap kernel/fork.c:634 [inline] #1: ffff888045dbcd98 (&mm->mmap_lock){++++}-{3:3}, at: dup_mm kernel/fork.c:1671 [inline] #1: ffff888045dbcd98 (&mm->mmap_lock){++++}-{3:3}, at: copy_mm+0x29a/0x1f30 kernel/fork.c:1720 #2: ffff88806cb9e098 (&mm->mmap_lock/1){+.+.}-{3:3}, at: mmap_write_lock_nested include/linux/mmap_lock.h:113 [inline] #2: ffff88806cb9e098 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mmap kernel/fork.c:643 [inline] #2: ffff88806cb9e098 (&mm->mmap_lock/1){+.+.}-{3:3}, at: dup_mm kernel/fork.c:1671 [inline] #2: ffff88806cb9e098 (&mm->mmap_lock/1){+.+.}-{3:3}, at: copy_mm+0x3de/0x1f30 kernel/fork.c:1720 #3: ffffc90000007c00 (&(&bat_priv->nc.work)->timer){..-.}-{0:0}, at: call_timer_fn+0xc0/0x650 kernel/time/timer.c:1789 #4: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #4: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #4: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: __queue_work+0x199/0xf50 kernel/workqueue.c:2261 #5: ffff8880150a0018 (&pool->lock){-.-.}-{2:2}, at: __queue_work+0x759/0xf50 #6: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline] #6: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline] #6: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #6: ffffffff8e336e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x24c/0x5a0 kernel/trace/bpf_trace.c:2448 stack backtrace: CPU: 0 PID: 5098 Comm: syz-executor Not tainted 6.10.0-syzkaller-09703-gd7e78951a8b8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4012 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4215 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 __lock_acquire+0xbf9/0x2040 kernel/locking/lockdep.c:5096 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0xa8/0x630 mm/mmap_lock.c:237 __mmap_lock_trace_acquire_returned include/linux/mmap_lock.h:36 [inline] mmap_read_trylock include/linux/mmap_lock.h:164 [inline] stack_map_get_build_id_offset+0x9af/0x9d0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x4ad/0x5a0 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1997 [inline] bpf_get_stack_raw_tp+0x1a3/0x240 kernel/trace/bpf_trace.c:1987 bpf_prog_ec3b2eefa702d8d3+0x42/0x46 bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run3+0x33a/0x5a0 kernel/trace/bpf_trace.c:2448 trace_workqueue_queue_work include/trace/events/workqueue.h:23 [inline] __queue_work+0xee6/0xf50 kernel/workqueue.c:2323 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1838 [inline] __run_timers kernel/time/timer.c:2417 [inline] __run_timer_base+0x695/0x8e0 kernel/time/timer.c:2428 run_timer_base kernel/time/timer.c:2437 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 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 RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x18/0x70 kernel/kcov.c:207 Code: 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 65 48 8b 0c 25 80 d5 03 00 65 8b 15 70 8b 70 7e c2 00 01 ff 00 74 11 f7 c2 00 01 00 00 74 35 83 b9 1c 16 00 00 RSP: 0018:ffffc90003bb7458 EFLAGS: 00000202 RAX: ffffffff8137818f RBX: ffffffff8b8dae83 RCX: ffff88801e6cda00 RDX: 0000000080000000 RSI: 0000000080000000 RDI: 0000000000000000 RBP: ffffc90003bb74f0 R08: ffffffff814135c5 R09: ffffffff814130bf R10: 0000000000000003 R11: ffff88801e6cda00 R12: ffff88801e6cda00 R13: ffffffff817ef0e0 R14: ffffc90003bb7540 R15: ffffc90003bb7460 arch_stack_walk+0x15f/0x1b0 arch/x86/kernel/stacktrace.c:24 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 unpoison_slab_object mm/kasan/common.c:312 [inline] __kasan_slab_alloc+0x66/0x80 mm/kasan/common.c:338 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3979 [inline] slab_alloc_node mm/slub.c:4028 [inline] kmem_cache_alloc_noprof+0x135/0x2a0 mm/slub.c:4035 vma_lock_alloc kernel/fork.c:443 [inline] vm_area_dup+0x61/0x290 kernel/fork.c:496 dup_mmap kernel/fork.c:693 [inline] dup_mm kernel/fork.c:1671 [inline] copy_mm+0xc7b/0x1f30 kernel/fork.c:1720 copy_process+0x187a/0x3dc0 kernel/fork.c:2373 kernel_clone+0x226/0x8f0 kernel/fork.c:2780 __do_sys_clone kernel/fork.c:2923 [inline] __se_sys_clone kernel/fork.c:2907 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2907 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:0x7ffa8036c453 Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00 RSP: 002b:00007ffd83d434a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffa8036c453 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 000055556aac47d0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 1 bytes skipped: 0: 00 90 90 90 90 90 add %dl,-0x6f6f6f70(%rax) 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: f3 0f 1e fa endbr64 15: 48 8b 04 24 mov (%rsp),%rax 19: 65 48 8b 0c 25 80 d5 mov %gs:0x3d580,%rcx 20: 03 00 22: 65 8b 15 70 8b 70 7e mov %gs:0x7e708b70(%rip),%edx # 0x7e708b99 * 29: f7 c2 00 01 ff 00 test $0xff0100,%edx <-- trapping instruction 2f: 74 11 je 0x42 31: f7 c2 00 01 00 00 test $0x100,%edx 37: 74 35 je 0x6e 39: 83 .byte 0x83 3a: b9 1c 16 00 00 mov $0x161c,%ecx