================================ WARNING: inconsistent lock state 6.10.0-rc1-syzkaller-00304-g83814698cf48 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.3/5791 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9238ac0 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9238ac0 (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_lock include/linux/mmap_lock.h:145 [inline] exit_mm kernel/exit.c:541 [inline] do_exit+0xeb7/0x2ba0 kernel/exit.c:861 do_group_exit+0xd3/0x2a0 kernel/exit.c:1023 get_signal+0x2616/0x2710 kernel/signal.c:2909 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x14a/0x2a0 kernel/entry/common.c:218 do_syscall_64+0xda/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 10760 hardirqs last enabled at (10759): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (10759): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (10760): [] sysvec_call_function_single+0xe/0xb0 arch/x86/kernel/smp.c:266 softirqs last enabled at (10452): [] softirq_handle_end kernel/softirq.c:400 [inline] softirqs last enabled at (10452): [] handle_softirqs+0x5be/0x8f0 kernel/softirq.c:582 softirqs last disabled at (10297): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (10297): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (10297): [] __irq_exit_rcu kernel/softirq.c:637 [inline] softirqs last disabled at (10297): [] irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock#10); lock(lock#10); *** DEADLOCK *** 4 locks held by syz-executor.3/5791: #0: ffff8880162f2420 (sb_writers#6){.+.+}-{0:0}, at: ksys_fallocate fs/open.c:353 [inline] #0: ffff8880162f2420 (sb_writers#6){.+.+}-{0:0}, at: __do_sys_fallocate fs/open.c:361 [inline] #0: ffff8880162f2420 (sb_writers#6){.+.+}-{0:0}, at: __se_sys_fallocate fs/open.c:359 [inline] #0: ffff8880162f2420 (sb_writers#6){.+.+}-{0:0}, at: __x64_sys_fallocate+0xd5/0x140 fs/open.c:359 #1: ffff88801fdf8ff0 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline] #1: ffff88801fdf8ff0 (&sb->s_type->i_mutex_key#12){+.+.}-{3:3}, at: shmem_fallocate+0x1a0/0xfb0 mm/shmem.c:3093 #2: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #2: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #2: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: avc_has_perm_noaudit+0x61/0x3a0 security/selinux/avc.c:1153 #3: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #3: ffffffff8dbb18e0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1c2/0x590 kernel/trace/bpf_trace.c:2444 stack backtrace: CPU: 0 PID: 5791 Comm: syz-executor.3 Not tainted 6.10.0-rc1-syzkaller-00304-g83814698cf48 #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+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:2012 __bpf_prog_run32+0xc1/0x100 kernel/bpf/core.c:2253 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+0x90/0xb0 arch/x86/kernel/smp.c:266 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709 RIP: 0010:__sanitizer_cov_trace_pc+0x38/0x60 kernel/kcov.c:210 Code: 05 45 04 76 7e a9 00 01 ff 00 48 8b 34 24 74 0f f6 c4 01 74 35 8b 82 1c 16 00 00 85 c0 74 2b 8b 82 f8 15 00 00 83 f8 02 75 20 <48> 8b 8a 00 16 00 00 8b 92 fc 15 00 00 48 8b 01 48 83 c0 01 48 39 RSP: 0018:ffffc900033878e8 EFLAGS: 00000246 RAX: 0000000000000002 RBX: ffff888078a7aea0 RCX: ffffc9000a9e0000 RDX: ffff88802b1c8000 RSI: ffffffff84396b35 RDI: ffff88807bc26c58 RBP: 0000000000000006 R08: 0000000000000002 R09: 0000000000000005 R10: 0000000000000006 R11: 0000000000000002 R12: dffffc0000000000 R13: 0000000000000091 R14: 0000000000000005 R15: 0000000000000091 avc_search_node security/selinux/avc.c:531 [inline] avc_lookup+0xb5/0x1d0 security/selinux/avc.c:560 avc_has_perm_noaudit+0x97/0x3a0 security/selinux/avc.c:1154 cred_has_capability security/selinux/hooks.c:1645 [inline] selinux_vm_enough_memory+0x12b/0x1b0 security/selinux/hooks.c:2216 security_vm_enough_memory_mm+0x6d/0xc0 security/security.c:1125 shmem_acct_blocks mm/shmem.c:200 [inline] shmem_inode_acct_blocks+0x345/0x450 mm/shmem.c:216 shmem_alloc_and_add_folio+0x302/0x790 mm/shmem.c:1693 shmem_get_folio_gfp+0x687/0x13d0 mm/shmem.c:2055 shmem_get_folio mm/shmem.c:2160 [inline] shmem_fallocate+0x802/0xfb0 mm/shmem.c:3177 vfs_fallocate+0x4b8/0xfb0 fs/open.c:330 ksys_fallocate fs/open.c:353 [inline] __do_sys_fallocate fs/open.c:361 [inline] __se_sys_fallocate fs/open.c:359 [inline] __x64_sys_fallocate+0xd5/0x140 fs/open.c:359 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 RIP: 0033:0x7fcd8b27cee9 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:00007fcd8c0570c8 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007fcd8b3b4070 RCX: 00007fcd8b27cee9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000006 RBP: 00007fcd8b2c947f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000002400001 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fcd8b3b4070 R15: 00007fffea0f1488 ---------------- Code disassembly (best guess): 0: 05 45 04 76 7e add $0x7e760445,%eax 5: a9 00 01 ff 00 test $0xff0100,%eax a: 48 8b 34 24 mov (%rsp),%rsi e: 74 0f je 0x1f 10: f6 c4 01 test $0x1,%ah 13: 74 35 je 0x4a 15: 8b 82 1c 16 00 00 mov 0x161c(%rdx),%eax 1b: 85 c0 test %eax,%eax 1d: 74 2b je 0x4a 1f: 8b 82 f8 15 00 00 mov 0x15f8(%rdx),%eax 25: 83 f8 02 cmp $0x2,%eax 28: 75 20 jne 0x4a * 2a: 48 8b 8a 00 16 00 00 mov 0x1600(%rdx),%rcx <-- trapping instruction 31: 8b 92 fc 15 00 00 mov 0x15fc(%rdx),%edx 37: 48 8b 01 mov (%rcx),%rax 3a: 48 83 c0 01 add $0x1,%rax 3e: 48 rex.W 3f: 39 .byte 0x39