================================ WARNING: inconsistent lock state 6.10.0-rc6-syzkaller-00212-g1dd28064d416 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz.1.1981/11462 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9338a80 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9338a80 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_acquire_returned+0x7f/0x790 mm/mmap_lock.c:237 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0xeb/0x6a0 mm/memory.c:5776 do_user_addr_fault+0x29c/0xe50 arch/x86/mm/fault.c:1361 handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x4a/0x70 arch/x86/lib/copy_user_64.S:65 copy_user_generic arch/x86/include/asm/uaccess_64.h:110 [inline] raw_copy_to_user arch/x86/include/asm/uaccess_64.h:131 [inline] _copy_to_user lib/usercopy.c:46 [inline] _copy_to_user+0xac/0xc0 lib/usercopy.c:39 copy_to_user include/linux/uaccess.h:191 [inline] rng_dev_read+0x25d/0x720 drivers/char/hw_random/core.c:252 do_loop_readv_writev fs/read_write.c:761 [inline] do_loop_readv_writev fs/read_write.c:749 [inline] vfs_readv+0x6cb/0x8a0 fs/read_write.c:934 do_preadv fs/read_write.c:1049 [inline] __do_sys_preadv fs/read_write.c:1099 [inline] __se_sys_preadv fs/read_write.c:1094 [inline] __x64_sys_preadv+0x22b/0x310 fs/read_write.c:1094 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 3344 hardirqs last enabled at (3343): [] asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707 hardirqs last disabled at (3344): [] irqentry_enter+0x54/0x60 kernel/entry/common.c:243 softirqs last enabled at (2636): [] local_bh_enable include/linux/bottom_half.h:33 [inline] softirqs last enabled at (2636): [] fpregs_unlock arch/x86/include/asm/fpu/api.h:80 [inline] softirqs last enabled at (2636): [] fpu_clone+0x393/0xbc0 arch/x86/kernel/fpu/core.c:634 softirqs last disabled at (2634): [] local_bh_disable include/linux/bottom_half.h:20 [inline] softirqs last disabled at (2634): [] fpregs_lock arch/x86/include/asm/fpu/api.h:72 [inline] softirqs last disabled at (2634): [] fpu_clone+0x328/0xbc0 arch/x86/kernel/fpu/core.c:630 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 2 locks held by syz.1.1981/11462: #0: ffffffff8dbb1620 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8dbb1620 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8dbb1620 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #0: ffffffff8dbb1620 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 #1: ffff888024343118 (&mm->mmap_lock){++++}-{3:3}, at: mmap_read_trylock include/linux/mmap_lock.h:163 [inline] #1: ffff888024343118 (&mm->mmap_lock){++++}-{3:3}, at: stack_map_get_build_id_offset+0x1e8/0x7c0 kernel/bpf/stackmap.c:141 stack backtrace: CPU: 1 PID: 11462 Comm: syz.1.1981 Not tainted 6.10.0-rc6-syzkaller-00212-g1dd28064d416 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5719 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_acquire_returned+0x97/0x790 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+0x5d9/0x7c0 kernel/bpf/stackmap.c:141 __bpf_get_stack+0x6bf/0x700 kernel/bpf/stackmap.c:449 ____bpf_get_stack_raw_tp kernel/trace/bpf_trace.c:1994 [inline] bpf_get_stack_raw_tp+0x124/0x160 kernel/trace/bpf_trace.c:1984 ___bpf_prog_run+0x3e51/0xabd0 kernel/bpf/core.c:2011 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2252 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:2403 [inline] bpf_trace_run2+0x231/0x590 kernel/trace/bpf_trace.c:2444 __bpf_trace_tlb_flush+0xd2/0x110 include/trace/events/tlb.h:38 trace_tlb_flush+0xf3/0x170 include/trace/events/tlb.h:38 csd_do_func kernel/smp.c:133 [inline] __flush_smp_call_function_queue+0x27a/0x8c0 kernel/smp.c:511 __sysvec_call_function_single+0x8c/0x410 arch/x86/kernel/smp.c:271 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline] sysvec_call_function_single+0x43/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0033:0x7f293025516c Code: 5d 41 5e 41 5f c3 0f 1f 84 00 00 00 00 00 41 b8 01 00 00 00 41 89 db 89 de 8d 7b 04 89 d8 89 c1 81 e1 ff 1f 00 00 49 8b 14 cf <48> 39 f2 0f 84 5f ff ff ff 48 85 d2 0f 84 d2 01 00 00 83 c0 01 39 RSP: 002b:00007ffd0b5ae320 EFLAGS: 00000206 RAX: 000000008181acd2 RBX: ffffffff8181acd2 RCX: 0000000000000cd2 RDX: 000000008181acd2 RSI: 000000008181acd2 RDI: 000000008181acd6 RBP: 00007f2931035720 R08: 0000000000000001 R09: 00007f292f601000 R10: 0000000000000008 R11: 000000008181acd2 R12: ffffffff8181ac45 R13: 00007f29305040d0 R14: 000000000000332a R15: 00007f29304f0000 vkms_vblank_simulate: vblank timer overrun