=============================
[ BUG: Invalid wait context ]
6.16.0-syzkaller #0 Not tainted
-----------------------------
syz.0.0/5343 is trying to lock:
ffffc900019f7410 (&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}
8 locks held by syz.0.0/5343:
#0: ffff8880391d2428 (sb_writers#12){.+.+}-{0:0}, at: direct_splice_actor+0x49/0x160 fs/splice.c:1157
#1: ffff8880391d2618 (sb_internal#2){.+.+}-{0:0}, at: btrfs_sync_file+0xbf5/0x1160 fs/btrfs/file.c:1704
#2: ffff88805316e508 (btrfs_trans_num_writers){++++}-{0:0}, at: join_transaction+0x41b/0xd70 fs/btrfs/transaction.c:296
#3: ffff88805316e530 (btrfs_trans_num_extwriters){++++}-{0:0}, at: join_transaction+0x41b/0xd70 fs/btrfs/transaction.c:296
#4: ffff88805316e558 (btrfs_trans_commit_prep){.+.+}-{0:0}, at: btrfs_commit_transaction+0x161/0x37f0 fs/btrfs/transaction.c:2185
#5: ffff888054ad3078 (&head_ref->mutex){+.+.}-{4:4}, at: btrfs_delayed_ref_lock+0x88/0x2b0 fs/btrfs/delayed-ref.c:353
#6: ffff88803ed5e1c8 (&tree->lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline]
#6: ffff88803ed5e1c8 (&tree->lock){+.+.}-{3:3}, at: set_extent_bit+0x288/0x2180 fs/btrfs/extent-io-tree.c:1084
#7: ffffc900019f7960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_lock_acquire include/linux/srcu.h:161 [inline]
#7: ffffc900019f7960 (&kvm->srcu){.?.+}-{0:0}, at: srcu_read_lock include/linux/srcu.h:253 [inline]
#7: ffffc900019f7960 (&kvm->srcu){.?.+}-{0:0}, at: kvm_xen_set_evtchn_fast+0x1c3/0x9b0 arch/x86/kvm/xen.c:1818
stack backtrace:
CPU: 0 UID: 0 PID: 5343 Comm: syz.0.0 Not tainted 6.16.0-syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_lock_invalid_wait_context kernel/locking/lockdep.c:4833 [inline]
check_wait_context kernel/locking/lockdep.c:4905 [inline]
__lock_acquire+0xbcb/0xd20 kernel/locking/lockdep.c:5190
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
__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:lock_release+0x2b5/0x3e0 kernel/locking/lockdep.c:5896
Code: 51 48 c7 44 24 20 00 00 00 00 9c 8f 44 24 20 f7 44 24 20 00 02 00 00 75 56 f7 c3 00 02 00 00 74 01 fb 65 48 8b 05 eb 31 02 11 <48> 3b 44 24 28 0f 85 8b 00 00 00 48 83 c4 30 5b 41 5c 41 5d 41 5e
RSP: 0018:ffffc9000feae3d0 EFLAGS: 00000206
RAX: aa447f416a640300 RBX: 0000000000000202 RCX: aa447f416a640300
RDX: 0000000000000007 RSI: ffffffff8db87386 RDI: ffffffff8be29f00
RBP: ffff888000633048 R08: ffffc9000feafcf0 R09: 0000000000000000
R10: ffffc9000feae558 R11: fffff52001fd5cad R12: 0000000000000007
R13: 0000000000000007 R14: ffffffff8e13f0e0 R15: ffff888000632440
rcu_lock_release include/linux/rcupdate.h:341 [inline]
rcu_read_unlock include/linux/rcupdate.h:871 [inline]
class_rcu_destructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0x19a9/0x2390 arch/x86/kernel/unwind_orc.c:680
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x62/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2381 [inline]
slab_free mm/slub.c:4643 [inline]
kmem_cache_free+0x18f/0x400 mm/slub.c:4745
merge_prev_state fs/btrfs/extent-io-tree.c:352 [inline]
merge_state+0x225/0x500 fs/btrfs/extent-io-tree.c:385
set_extent_bit+0x1a40/0x2180 fs/btrfs/extent-io-tree.c:1102
btrfs_set_extent_bit+0x38/0x50 fs/btrfs/extent-io-tree.c:1296
btrfs_update_block_group+0x6e5/0xad0 fs/btrfs/block-group.c:3742
do_free_extent_accounting fs/btrfs/extent-tree.c:3007 [inline]
__btrfs_free_extent+0x16f7/0x2eb0 fs/btrfs/extent-tree.c:3370
run_delayed_tree_ref fs/btrfs/extent-tree.c:1747 [inline]
run_one_delayed_ref fs/btrfs/extent-tree.c:1773 [inline]
btrfs_run_delayed_refs_for_head fs/btrfs/extent-tree.c:1970 [inline]
__btrfs_run_delayed_refs+0xe7b/0x3a50 fs/btrfs/extent-tree.c:2045
btrfs_run_delayed_refs+0xe6/0x300 fs/btrfs/extent-tree.c:2157
btrfs_commit_transaction+0x274/0x37f0 fs/btrfs/transaction.c:2208
btrfs_sync_file+0xd30/0x1160 fs/btrfs/file.c:1797
generic_write_sync include/linux/fs.h:3031 [inline]
btrfs_do_write_iter+0x59a/0x710 fs/btrfs/file.c:1448
iter_file_splice_write+0x93a/0x1000 fs/splice.c:738
do_splice_from fs/splice.c:935 [inline]
direct_splice_actor+0x101/0x160 fs/splice.c:1158
splice_direct_to_actor+0x5a5/0xcc0 fs/splice.c:1102
do_splice_direct_actor fs/splice.c:1201 [inline]
do_splice_direct+0x181/0x270 fs/splice.c:1227
do_sendfile+0x4da/0x7e0 fs/read_write.c:1370
__do_sys_sendfile64 fs/read_write.c:1431 [inline]
__se_sys_sendfile64+0x13e/0x190 fs/read_write.c:1417
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:0x7fa8c818e9a9
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:00007fa8c90ac038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fa8c83b6080 RCX: 00007fa8c818e9a9
RDX: 0000000000000000 RSI: 000000000000000b RDI: 000000000000000b
RBP: 00007fa8c8210d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0001000200201005 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007fa8c83b6080 R15: 00007fff3a6f6e08
----------------
Code disassembly (best guess):
0: 51 push %rcx
1: 48 c7 44 24 20 00 00 movq $0x0,0x20(%rsp)
8: 00 00
a: 9c pushf
b: 8f 44 24 20 pop 0x20(%rsp)
f: f7 44 24 20 00 02 00 testl $0x200,0x20(%rsp)
16: 00
17: 75 56 jne 0x6f
19: f7 c3 00 02 00 00 test $0x200,%ebx
1f: 74 01 je 0x22
21: fb sti
22: 65 48 8b 05 eb 31 02 mov %gs:0x110231eb(%rip),%rax # 0x11023215
29: 11
* 2a: 48 3b 44 24 28 cmp 0x28(%rsp),%rax <-- trapping instruction
2f: 0f 85 8b 00 00 00 jne 0xc0
35: 48 83 c4 30 add $0x30,%rsp
39: 5b pop %rbx
3a: 41 5c pop %r12
3c: 41 5d pop %r13
3e: 41 5e pop %r14