================================ WARNING: inconsistent lock state 6.10.0-rc1-syzkaller-00217-g0dcc53abf58d #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.0/11600 [HC1[1]:SC1[1]:HE0:SE0] takes: ffff8880b9438828 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9438828 (lock#10){?.+.}-{2:2}, at: __mmap_lock_do_trace_released+0x83/0x620 mm/mmap_lock.c:243 {HARDIRQ-ON-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock include/linux/mmap_lock.h:170 [inline] do_user_addr_fault arch/x86/mm/fault.c:1417 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x7a2/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 rep_movs_alternative+0x33/0x70 arch/x86/lib/copy_user_64.S:57 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_iter lib/iov_iter.c:25 [inline] iterate_ubuf include/linux/iov_iter.h:29 [inline] iterate_and_advance2 include/linux/iov_iter.h:245 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] _copy_to_iter+0x26b/0x1960 lib/iov_iter.c:185 copy_page_to_iter+0xb1/0x160 lib/iov_iter.c:362 pipe_read+0x59c/0x13e0 fs/pipe.c:327 new_sync_read fs/read_write.c:395 [inline] vfs_read+0x9c4/0xbd0 fs/read_write.c:476 ksys_read+0x1a0/0x2c0 fs/read_write.c:619 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: 2165 hardirqs last enabled at (2164): [] irqentry_exit+0x63/0x90 kernel/entry/common.c:357 hardirqs last disabled at (2165): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (1952): [] bpf_test_run+0x31e/0x910 softirqs last disabled at (2035): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (2035): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (2035): [] __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 *** 1 lock held by syz-executor.0/11600: #0: ffffffff8e334020 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e334020 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2529 [inline] #0: ffffffff8e334020 (rcu_callback){....}-{0:0}, at: rcu_core+0xa86/0x1830 kernel/rcu/tree.c:2809 stack backtrace: CPU: 0 PID: 11600 Comm: syz-executor.0 Not tainted 6.10.0-rc1-syzkaller-00217-g0dcc53abf58d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] __mmap_lock_do_trace_released+0x9c/0x620 mm/mmap_lock.c:243 __mmap_lock_trace_released include/linux/mmap_lock.h:42 [inline] mmap_read_unlock_non_owner include/linux/mmap_lock.h:176 [inline] do_mmap_read_unlock+0x5d/0x60 kernel/bpf/task_iter.c:1049 irq_work_single+0xe2/0x240 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run+0x18b/0x350 kernel/irq_work.c:261 __sysvec_irq_work+0xb8/0x430 arch/x86/kernel/irq_work.c:22 instr_sysvec_irq_work arch/x86/kernel/irq_work.c:17 [inline] sysvec_irq_work+0x4f/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:87 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:104 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:129 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:161 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline] RIP: 0010:kasan_check_range+0x86/0x290 mm/kasan/generic.c:189 Code: 00 fc ff df 4f 8d 3c 31 4c 89 fd 4c 29 dd 48 83 fd 10 7f 29 48 85 ed 0f 84 3e 01 00 00 4c 89 cd 48 f7 d5 48 01 dd 41 80 3b 00 <0f> 85 c9 01 00 00 49 ff c3 48 ff c5 75 ee e9 1e 01 00 00 45 89 dc RSP: 0018:ffffc900000076e8 EFLAGS: 00000246 RAX: ffffffff81410f01 RBX: 1ffff92000000ef4 RCX: ffffffff81410f5e RDX: 0000000000000001 RSI: 0000000000000060 RDI: ffffc900000077a0 RBP: fffffffffffffffc R08: ffffc900000077ff R09: 1ffff92000000eff R10: dffffc0000000000 R11: fffff52000000efc R12: 0000000000000000 R13: ffffffff8181cfd0 R14: dffffc0000000001 R15: fffff52000000f00 __asan_memset+0x23/0x50 mm/kasan/shadow.c:84 __unwind_start+0x3e/0x7c0 arch/x86/kernel/unwind_orc.c:688 unwind_start arch/x86/include/asm/unwind.h:64 [inline] arch_stack_walk+0x103/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 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xe0/0x150 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:2195 [inline] slab_free mm/slub.c:4436 [inline] kmem_cache_free+0x145/0x350 mm/slub.c:4511 rcu_do_batch kernel/rcu/tree.c:2535 [inline] rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2809 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:unwind_next_frame+0x176/0x2a00 arch/x86/kernel/unwind_orc.c:494 Code: 05 e8 ce 35 55 00 49 89 ec 48 8d 55 35 48 89 d0 48 c1 e8 03 49 be 00 00 00 00 00 fc ff df 48 89 44 24 78 42 0f b6 04 30 84 c0 <48> 8b 5c 24 20 48 89 54 24 10 0f 85 f6 1f 00 00 48 0f be 2a 48 8b RSP: 0018:ffffc900037bf628 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000040000 RDX: ffffc900037bf735 RSI: 0000000000001486 RDI: 0000000000001487 RBP: ffffc900037bf700 R08: ffffffff8140e001 R09: ffffc900037bf7f0 R10: 0000000000000003 R11: ffffffff8181cfd0 R12: ffffc900037bf700 R13: ffffc900037bf750 R14: dffffc0000000000 R15: ffffffff8b85f4e3 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+0xe0/0x150 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:2195 [inline] slab_free mm/slub.c:4436 [inline] kfree+0x149/0x360 mm/slub.c:4557 sk_prot_free net/core/sock.c:2116 [inline] __sk_destruct+0x476/0x5f0 net/core/sock.c:2208 bpf_prog_test_run_skb+0xdac/0x13a0 net/bpf/test_run.c:1101 bpf_prog_test_run+0x33a/0x3b0 kernel/bpf/syscall.c:4292 __sys_bpf+0x48d/0x810 kernel/bpf/syscall.c:5706 __do_sys_bpf kernel/bpf/syscall.c:5795 [inline] __se_sys_bpf kernel/bpf/syscall.c:5793 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5793 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:0x7f011a27cf69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f011b03a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f011a3b3f80 RCX: 00007f011a27cf69 RDX: 0000000000000050 RSI: 0000000020000600 RDI: 000000000000000a RBP: 00007f011a2da6fe R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f011a3b3f80 R15: 00007ffe0f4313f8 ---------------- Code disassembly (best guess), 3 bytes skipped: 0: df 4f 8d fisttps -0x73(%rdi) 3: 3c 31 cmp $0x31,%al 5: 4c 89 fd mov %r15,%rbp 8: 4c 29 dd sub %r11,%rbp b: 48 83 fd 10 cmp $0x10,%rbp f: 7f 29 jg 0x3a 11: 48 85 ed test %rbp,%rbp 14: 0f 84 3e 01 00 00 je 0x158 1a: 4c 89 cd mov %r9,%rbp 1d: 48 f7 d5 not %rbp 20: 48 01 dd add %rbx,%rbp 23: 41 80 3b 00 cmpb $0x0,(%r11) * 27: 0f 85 c9 01 00 00 jne 0x1f6 <-- trapping instruction 2d: 49 ff c3 inc %r11 30: 48 ff c5 inc %rbp 33: 75 ee jne 0x23 35: e9 1e 01 00 00 jmp 0x158 3a: 45 89 dc mov %r11d,%r12d