================================ WARNING: inconsistent lock state 6.10.0-rc1-syzkaller-g7d0b3953f6d8 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. udevd/4549 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b9538828 (lock#10){?.+.}-{2:2}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff8880b9538828 (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_start_locking+0x9c/0x620 mm/mmap_lock.c:230 __mmap_lock_trace_start_locking include/linux/mmap_lock.h:29 [inline] mmap_read_trylock include/linux/mmap_lock.h:162 [inline] vmf_anon_prepare mm/memory.c:3240 [inline] do_anonymous_page mm/memory.c:4457 [inline] do_pte_missing mm/memory.c:3901 [inline] handle_pte_fault+0x6fd8/0x7130 mm/memory.c:5380 __handle_mm_fault mm/memory.c:5523 [inline] handle_mm_fault+0x10df/0x1ba0 mm/memory.c:5688 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 irq event stamp: 1072672 hardirqs last enabled at (1072671): [] ___slab_alloc+0x341/0x14b0 mm/slub.c:3557 hardirqs last disabled at (1072672): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (1071990): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (1071990): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (1071990): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (1071929): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (1071929): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1071929): [] __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 udevd/4549: #0: ffffffff8e9bf8b0 (tomoyo_ss){.+.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:116 [inline] #0: ffffffff8e9bf8b0 (tomoyo_ss){.+.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:215 [inline] #0: ffffffff8e9bf8b0 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_read_lock security/tomoyo/common.h:1108 [inline] #0: ffffffff8e9bf8b0 (tomoyo_ss){.+.+}-{0:0}, at: tomoyo_check_open_permission+0x204/0x500 security/tomoyo/file.c:767 stack backtrace: CPU: 1 PID: 4549 Comm: udevd Not tainted 6.10.0-rc1-syzkaller-g7d0b3953f6d8 #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+0x9e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:738 RIP: 0010:___slab_alloc+0x4f7/0x14b0 mm/slub.c:3596 Code: e9 78 fb ff ff e8 79 97 95 09 f7 c3 00 02 00 00 74 18 e9 8e fe ff ff 48 c7 43 10 00 00 00 00 4c 89 ff 48 89 de e8 f9 15 00 00 <49> 83 7c 24 18 00 0f 84 89 06 00 00 48 c7 44 24 60 00 00 00 00 9c RSP: 0018:ffffc90003ef7418 EFLAGS: 00000206 RAX: b8c2a82908059400 RBX: 0000000000000246 RCX: ffffffff8172c78a RDX: dffffc0000000000 RSI: ffffffff8bcaba80 RDI: ffffffff8c1ff240 RBP: ffff8880b9542a00 R08: ffffffff92fa85bf R09: 1ffffffff25f50b7 R10: dffffc0000000000 R11: fffffbfff25f50b8 R12: ffff8880b95429e0 R13: ffff888079040000 R14: 00000000ffffffff R15: ffff888015042140 __slab_alloc+0x58/0xa0 mm/slub.c:3756 __slab_alloc_node mm/slub.c:3809 [inline] slab_alloc_node mm/slub.c:3988 [inline] __do_kmalloc_node mm/slub.c:4120 [inline] __kmalloc_noprof+0x257/0x400 mm/slub.c:4134 kmalloc_noprof include/linux/slab.h:664 [inline] tomoyo_realpath_from_path+0xcf/0x5e0 security/tomoyo/realpath.c:251 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_check_open_permission+0x255/0x500 security/tomoyo/file.c:771 security_file_open+0x6a/0x730 security/security.c:2962 do_dentry_open+0x36c/0x1720 fs/open.c:942 do_open fs/namei.c:3650 [inline] path_openat+0x289f/0x3280 fs/namei.c:3807 do_filp_open+0x235/0x490 fs/namei.c:3834 do_sys_openat2+0x13e/0x1d0 fs/open.c:1405 do_sys_open fs/open.c:1420 [inline] __do_sys_openat fs/open.c:1436 [inline] __se_sys_openat fs/open.c:1431 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1431 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:0x7fb934b1a477 Code: 10 00 00 00 44 8b 54 24 e0 48 89 44 24 c0 48 8d 44 24 d0 48 89 44 24 c8 44 89 c2 4c 89 ce bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 82 69 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffcfc308f38 EFLAGS: 00000287 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000557353e26650 RCX: 00007fb934b1a477 RDX: 0000000000090800 RSI: 0000557353e0b6e0 RDI: 00000000ffffff9c RBP: 0000557353ebc340 R08: 0000000000090800 R09: 0000557353e0b6e0 R10: 0000000000000000 R11: 0000000000000287 R12: 0000557353e0b6e0 R13: 00000000000000ff R14: 000055731f8ae1c4 R15: 0000000000000000 ---------------- Code disassembly (best guess): 0: e9 78 fb ff ff jmp 0xfffffb7d 5: e8 79 97 95 09 call 0x9959783 a: f7 c3 00 02 00 00 test $0x200,%ebx 10: 74 18 je 0x2a 12: e9 8e fe ff ff jmp 0xfffffea5 17: 48 c7 43 10 00 00 00 movq $0x0,0x10(%rbx) 1e: 00 1f: 4c 89 ff mov %r15,%rdi 22: 48 89 de mov %rbx,%rsi 25: e8 f9 15 00 00 call 0x1623 * 2a: 49 83 7c 24 18 00 cmpq $0x0,0x18(%r12) <-- trapping instruction 30: 0f 84 89 06 00 00 je 0x6bf 36: 48 c7 44 24 60 00 00 movq $0x0,0x60(%rsp) 3d: 00 00 3f: 9c pushf