============================= [ BUG: Invalid wait context ] 6.13.0-rc6-syzkaller-00132-ge7e441a4100e #0 Not tainted ----------------------------- init/1 is trying to lock: ffff88813fffc9d8 (&zone->lock){-.-.}-{3:3}, at: rmqueue_buddy mm/page_alloc.c:2909 [inline] ffff88813fffc9d8 (&zone->lock){-.-.}-{3:3}, at: rmqueue mm/page_alloc.c:3082 [inline] ffff88813fffc9d8 (&zone->lock){-.-.}-{3:3}, at: get_page_from_freelist+0xb3d/0x37a0 mm/page_alloc.c:3473 other info that might help us debug this: context-{2:2} 4 locks held by init/1: #0: ffff88803503a178 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: process_measurement+0x7a6/0x1fb0 security/integrity/ima/ima_main.c:269 #1: ffff888148cacaf0 (mapping.invalidate_lock){.+.+}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:873 [inline] #1: ffff888148cacaf0 (mapping.invalidate_lock){.+.+}-{4:4}, at: page_cache_ra_unbounded+0x142/0x720 mm/readahead.c:226 #2: ffff8880b8644ad8 (&pcp->lock){+.+.}-{3:3}, at: spin_trylock include/linux/spinlock.h:361 [inline] #2: ffff8880b8644ad8 (&pcp->lock){+.+.}-{3:3}, at: rmqueue_pcplist mm/page_alloc.c:3032 [inline] #2: ffff8880b8644ad8 (&pcp->lock){+.+.}-{3:3}, at: rmqueue mm/page_alloc.c:3076 [inline] #2: ffff8880b8644ad8 (&pcp->lock){+.+.}-{3:3}, at: get_page_from_freelist+0x7d3/0x37a0 mm/page_alloc.c:3473 #3: ffff8880b863e8d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 stack backtrace: CPU: 0 UID: 0 PID: 1 Comm: init Not tainted 6.13.0-rc6-syzkaller-00132-ge7e441a4100e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5176 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 rmqueue_buddy mm/page_alloc.c:2909 [inline] rmqueue mm/page_alloc.c:3082 [inline] get_page_from_freelist+0xb3d/0x37a0 mm/page_alloc.c:3473 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 stack_depot_save_flags+0x72d/0x940 lib/stackdepot.c:627 kasan_save_stack+0x4f/0x60 mm/kasan/common.c:48 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:544 task_work_add+0xd9/0x490 kernel/task_work.c:77 task_tick_numa kernel/sched/fair.c:3616 [inline] task_tick_fair+0x58c/0x7b0 kernel/sched/fair.c:13101 sched_tick+0x21e/0x660 kernel/sched/core.c:5652 update_process_times+0x276/0x2f0 kernel/time/timer.c:2524 tick_sched_handle kernel/time/tick-sched.c:276 [inline] tick_nohz_handler+0x37c/0x500 kernel/time/tick-sched.c:297 __run_hrtimer kernel/time/hrtimer.c:1739 [inline] __hrtimer_run_queues+0x551/0xd30 kernel/time/hrtimer.c:1803 hrtimer_interrupt+0x403/0xa40 kernel/time/hrtimer.c:1865 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 8e 3a 3a f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 43 e5 a1 f5 65 8b 05 a4 28 38 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0000:ffffc90000065d40 EFLAGS: 00000206 RAX: 78b5fa73039bdc00 RBX: 1ffff9200000cbac RCX: ffffffff817b378a RDX: dffffc0000000000 RSI: ffffffff8c0a98e0 RDI: 0000000000000001 RBP: ffffc90000065dd8 R08: ffffffff942a5887 R09: 1ffffffff2854b10 R10: dffffc0000000000 R11: fffffbfff2854b11 R12: dffffc0000000000 R13: 1ffff9200000cba8 R14: ffffc90000065d60 R15: 0000000000000246 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline] rmqueue_bulk mm/page_alloc.c:2328 [inline] __rmqueue_pcplist+0x21fd/0x2a90 mm/page_alloc.c:3003 rmqueue_pcplist mm/page_alloc.c:3045 [inline] rmqueue mm/page_alloc.c:3076 [inline] get_page_from_freelist+0x886/0x37a0 mm/page_alloc.c:3473 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2269 alloc_pages_noprof mm/mempolicy.c:2348 [inline] folio_alloc_noprof+0x128/0x180 mm/mempolicy.c:2355 filemap_alloc_folio_noprof+0xdf/0x500 mm/filemap.c:1000 page_cache_ra_unbounded+0x30e/0x720 mm/readahead.c:268 filemap_readahead mm/filemap.c:2509 [inline] filemap_get_pages+0x95f/0x2080 mm/filemap.c:2554 filemap_read+0x452/0xf50 mm/filemap.c:2637 __kernel_read+0x513/0x9d0 fs/read_write.c:523 integrity_kernel_read+0xb0/0x100 security/integrity/iint.c:28 ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:480 [inline] ima_calc_file_shash security/integrity/ima/ima_crypto.c:511 [inline] ima_calc_file_hash+0xae6/0x1b30 security/integrity/ima/ima_crypto.c:568 ima_collect_measurement+0x520/0xb10 security/integrity/ima/ima_api.c:293 process_measurement+0x1351/0x1fb0 security/integrity/ima/ima_main.c:372 ima_file_mmap+0x1cd/0x220 security/integrity/ima/ima_main.c:462 security_mmap_file+0x7e7/0xa40 security/security.c:2977 vm_mmap_pgoff+0x141/0x3d0 mm/util.c:571 elf_map fs/binfmt_elf.c:391 [inline] elf_load+0x25a/0x700 fs/binfmt_elf.c:414 load_elf_interp+0x440/0xac0 fs/binfmt_elf.c:681 load_elf_binary+0x1a26/0x2770 fs/binfmt_elf.c:1241 search_binary_handler fs/exec.c:1748 [inline] exec_binprm fs/exec.c:1790 [inline] bprm_execve+0xaf5/0x17a0 fs/exec.c:1842 kernel_execve+0x931/0xa50 fs/exec.c:2009 try_to_run_init_process init/main.c:1394 [inline] kernel_init+0xed/0x2b0 init/main.c:1522 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 8e 3a 3a f6 call 0xf63a3aa2 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 43 e5 a1 f5 call 0xf5a1e572 <-- trapping instruction 2f: 65 8b 05 a4 28 38 74 mov %gs:0x743828a4(%rip),%eax # 0x743828da 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss