============================= [ BUG: Invalid wait context ] 6.16.0-next-20250807-syzkaller #0 Not tainted ----------------------------- syz.0.3009/16171 is trying to lock: ffff8880333cd410 (&gpc->lock){....}-{3:3}, at: kvm_xen_set_evtchn_fast+0x1fb/0x9b0 arch/x86/kvm/xen.c:1820 other info that might help us debug this: context-{2:2} 4 locks held by syz.0.3009/16171: #0: ffff8880230c0948 (mapping.invalidate_lock){++++}-{4:4}, at: filemap_invalidate_lock_shared include/linux/fs.h:934 [inline] #0: ffff8880230c0948 (mapping.invalidate_lock){++++}-{4:4}, at: page_cache_ra_order+0x318/0xd40 mm/readahead.c:488 #1: ffff88802510cd60 (&dd->lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #1: ffff88802510cd60 (&dd->lock){+.+.}-{3:3}, at: dd_insert_requests+0x14d/0xdc0 block/mq-deadline.c:718 #2: ffffffff8e539ee0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline] #2: ffffffff8e539ee0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline] #2: ffffffff8e539ee0 (rcu_read_lock){....}-{1:3}, at: blk_add_trace_rq+0x31/0x330 kernel/trace/blktrace.c:801 #3: ffff8880333cd960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline] #3: ffff8880333cd960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline] #3: ffff8880333cd960 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1c3/0x9b0 arch/x86/kvm/xen.c:1818 stack backtrace: CPU: 1 UID: 0 PID: 16171 Comm: syz.0.3009 Not tainted 6.16.0-next-20250807-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4830 [inline] check_wait_context kernel/locking/lockdep.c:4902 [inline] __lock_acquire+0xbcb/0xd20 kernel/locking/lockdep.c:5187 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5868 __raw_read_lock_irqsave include/linux/rwlock_api_smp.h:160 [inline] _raw_read_lock_irqsave+0xaf/0x100 kernel/locking/spinlock.c:236 kvm_xen_set_evtchn_fast+0x1fb/0x9b0 arch/x86/kvm/xen.c:1820 xen_timer_callback+0x109/0x220 arch/x86/kvm/xen.c:140 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x4e0/0xc60 kernel/time/hrtimer.c:1825 hrtimer_interrupt+0x45b/0xaa0 kernel/time/hrtimer.c:1887 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline] __sysvec_apic_timer_interrupt+0x108/0x410 arch/x86/kernel/apic/apic.c:1056 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__sanitizer_cov_trace_pc+0x3c/0x70 kernel/kcov.c:220 Code: 8b 15 58 2c 24 11 81 e2 00 01 ff 00 74 11 81 fa 00 01 00 00 75 35 83 b9 3c 16 00 00 00 74 2c 8b 91 18 16 00 00 83 fa 02 75 21 <48> 8b 91 20 16 00 00 48 8b 32 48 8d 7e 01 8b 89 1c 16 00 00 48 39 RSP: 0018:ffffc9000c5d6fb0 EFLAGS: 00000246 RAX: ffffffff81c81938 RBX: ffff88802fbaeb80 RCX: ffff88801cbbbc00 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000022 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff81c816d1 R10: dffffc0000000000 R11: fffffbfff1fc97c7 R12: ffff88802525b180 R13: 000000000110000c R14: dffffc0000000000 R15: 0000000000084700 blk_rq_pos include/linux/blk-mq.h:1080 [inline] blk_rq_trace_sector include/linux/blktrace_api.h:121 [inline] blk_add_trace_rq+0x298/0x330 kernel/trace/blktrace.c:813 __do_trace_block_rq_insert include/trace/events/block.h:238 [inline] trace_block_rq_insert include/trace/events/block.h:238 [inline] dd_insert_request block/mq-deadline.c:685 [inline] dd_insert_requests+0xbef/0xdc0 block/mq-deadline.c:724 blk_mq_dispatch_list+0x736/0xe00 block/blk-mq.c:2917 blk_mq_flush_plug_list+0x469/0x550 block/blk-mq.c:2967 __blk_flush_plug+0x3d3/0x4b0 block/blk-core.c:1220 blk_finish_plug+0x5e/0x90 block/blk-core.c:1247 read_pages+0x3b2/0x580 mm/readahead.c:173 page_cache_ra_order+0x8ca/0xd40 mm/readahead.c:512 do_async_mmap_readahead mm/filemap.c:3333 [inline] filemap_fault+0x5a0/0x1200 mm/filemap.c:3432 __do_fault+0x138/0x390 mm/memory.c:5152 do_read_fault mm/memory.c:5573 [inline] do_fault mm/memory.c:5707 [inline] do_pte_missing mm/memory.c:4234 [inline] handle_pte_fault mm/memory.c:6052 [inline] __handle_mm_fault+0x3611/0x5440 mm/memory.c:6195 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6364 faultin_page mm/gup.c:1144 [inline] __get_user_pages+0x1699/0x2ce0 mm/gup.c:1446 populate_vma_page_range+0x29f/0x3a0 mm/gup.c:1880 __mm_populate+0x24c/0x380 mm/gup.c:1983 mm_populate include/linux/mm.h:3374 [inline] vm_mmap_pgoff+0x387/0x4d0 mm/util.c:585 ksys_mmap_pgoff+0x51f/0x760 mm/mmap.c:604 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbc3e98ebe9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbc3f841038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fbc3ebb5fa0 RCX: 00007fbc3e98ebe9 RDX: 000000000300000b RSI: 0000000000b36000 RDI: 0000200000000000 RBP: 00007fbc3ea11e19 R08: 0000000000000003 R09: 00000000e3e1a000 R10: 0000000000028011 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fbc3ebb6038 R14: 00007fbc3ebb5fa0 R15: 00007ffe0da01818 ---------------- Code disassembly (best guess): 0: 8b 15 58 2c 24 11 mov 0x11242c58(%rip),%edx # 0x11242c5e 6: 81 e2 00 01 ff 00 and $0xff0100,%edx c: 74 11 je 0x1f e: 81 fa 00 01 00 00 cmp $0x100,%edx 14: 75 35 jne 0x4b 16: 83 b9 3c 16 00 00 00 cmpl $0x0,0x163c(%rcx) 1d: 74 2c je 0x4b 1f: 8b 91 18 16 00 00 mov 0x1618(%rcx),%edx 25: 83 fa 02 cmp $0x2,%edx 28: 75 21 jne 0x4b * 2a: 48 8b 91 20 16 00 00 mov 0x1620(%rcx),%rdx <-- trapping instruction 31: 48 8b 32 mov (%rdx),%rsi 34: 48 8d 7e 01 lea 0x1(%rsi),%rdi 38: 8b 89 1c 16 00 00 mov 0x161c(%rcx),%ecx 3e: 48 rex.W 3f: 39 .byte 0x39