------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 3 PID: 11982 at lib/refcount.c:28 refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Modules linked in:
CPU: 3 UID: 0 PID: 11982 Comm: kworker/u32:39 Not tainted 6.16.0-rc5-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
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Code: ff 89 de e8 b8 94 df fc 84 db 0f 85 66 ff ff ff e8 cb 99 df fc c6 05 9d 82 b5 0b 01 90 48 c7 c7 20 32 15 8c e8 17 93 9e fc 90 <0f> 0b 90 90 e9 43 ff ff ff e8 a8 99 df fc 0f b6 1d 78 82 b5 0b 31
RSP: 0018:ffffc900006f8858 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff817ae1a8
RDX: ffff88803d6e2440 RSI: ffffffff817ae1b5 RDI: 0000000000000001
RBP: ffff88810a42d878 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff88810a42d878
R13: ffff888054ffc800 R14: 0000000000000014 R15: 1ffff1100453280c
FS: 0000000000000000(0000) GS:ffff8880d6a18000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555577cb7808 CR3: 000000000e382000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 00000000000032e7 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
__refcount_sub_and_test include/linux/refcount.h:400 [inline]
__refcount_dec_and_test include/linux/refcount.h:432 [inline]
refcount_dec_and_test include/linux/refcount.h:450 [inline]
p9_req_put+0x1ec/0x250 net/9p/client.c:404
req_done+0x1dc/0x2e0 net/9p/trans_virtio.c:147
vring_interrupt drivers/virtio/virtio_ring.c:2715 [inline]
vring_interrupt+0x31e/0x400 drivers/virtio/virtio_ring.c:2690
__handle_irq_event_percpu+0x22c/0x7d0 kernel/irq/handle.c:158
handle_irq_event_percpu kernel/irq/handle.c:193 [inline]
handle_irq_event+0xab/0x1e0 kernel/irq/handle.c:210
handle_edge_irq+0x28e/0xab0 kernel/irq/chip.c:797
generic_handle_irq_desc include/linux/irqdesc.h:173 [inline]
handle_irq arch/x86/kernel/irq.c:254 [inline]
call_irq_handler arch/x86/kernel/irq.c:266 [inline]
__common_interrupt+0xdf/0x250 arch/x86/kernel/irq.c:292
common_interrupt+0x61/0xe0 arch/x86/kernel/irq.c:285
asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 16 c2 0d f6 48 89 df e8 fe 15 0e f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 95 33 fe f5 65 8b 05 2e ca 45 08 85 c0 74 16 5b
RSP: 0018:ffffc900006f8b98 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff88801deb0a10 RCX: 0000000000000002
RDX: 0000000000000000 RSI: ffffffff8de31064 RDI: ffffffff8c158660
RBP: 0000000000000287 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90a97357 R11: 0000000000000001 R12: ffff88801deb0a10
R13: ffff88806a73a2c0 R14: ffff88801deb0000 R15: ffffc900006f8bf0
class_raw_spinlock_irqsave_destructor include/linux/spinlock.h:557 [inline]
try_to_wake_up+0xa25/0x1680 kernel/sched/core.c:4231
call_timer_fn+0x197/0x620 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers+0x6ef/0x960 kernel/time/timer.c:2372
__run_timer_base kernel/time/timer.c:2384 [inline]
__run_timer_base kernel/time/timer.c:2376 [inline]
run_timer_base+0x114/0x190 kernel/time/timer.c:2393
run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2403
handle_softirqs+0x219/0x8e0 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0x109/0x170 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:36 [inline]
RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:139 [inline]
RIP: 0010:wrmsrq arch/x86/include/asm/msr.h:199 [inline]
RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:233 [inline]
RIP: 0010:__x2apic_send_IPI_shorthand arch/x86/kernel/apic/x2apic_phys.c:92 [inline]
RIP: 0010:x2apic_send_IPI_allbutself+0x21/0x40 arch/x86/kernel/apic/x2apic_phys.c:97
Code: 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 89 f8 83 ff 02 74 29 0d 00 00 0c 00 89 c6 0f ae f0 0f ae e8 b9 30 08 00 00 31 d2 0f 30 <66> 90 c3 cc cc cc cc 31 d2 bf 30 08 00 00 e9 1c 38 a6 03 be 00 04
RSP: 0018:ffffc90005d87860 EFLAGS: 00000246
RAX: 00000000000c00fc RBX: ffff88806a73b590 RCX: 0000000000000830
RDX: 0000000000000000 RSI: 00000000000c00fc RDI: 00000000000000fc
RBP: 0000000000000003 R08: 0000000000000000 R09: ffffed100d4e76b2
R10: ffff88806a73b597 R11: 0000000000000001 R12: ffffed100d4c8414
R13: 0000000000000000 R14: ffff88806a73b590 R15: ffff88806a73b580
kvm_smp_send_call_func_ipi+0x1e/0x250 arch/x86/kernel/kvm.c:640
arch_send_call_function_ipi_mask arch/x86/include/asm/smp.h:100 [inline]
send_call_function_ipi_mask kernel/smp.c:127 [inline]
smp_call_function_many_cond+0xc1e/0x1510 kernel/smp.c:869
on_each_cpu_cond_mask+0x40/0x90 kernel/smp.c:1052
on_each_cpu include/linux/smp.h:71 [inline]
smp_text_poke_sync_each_cpu arch/x86/kernel/alternative.c:2691 [inline]
smp_text_poke_batch_finish+0x7b5/0xdb0 arch/x86/kernel/alternative.c:2984
arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146
jump_label_update+0x376/0x550 kernel/jump_label.c:919
static_key_disable_cpuslocked+0x158/0x1c0 kernel/jump_label.c:240
static_key_disable+0x1a/0x20 kernel/jump_label.c:248
toggle_allocation_gate mm/kfence/core.c:855 [inline]
toggle_allocation_gate+0x145/0x280 mm/kfence/core.c:842
process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3321 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 16 c2 0d f6 call 0xf60dc229
13: 48 89 df mov %rbx,%rdi
16: e8 fe 15 0e f6 call 0xf60e1619
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 95 33 fe f5 call 0xf5fe33c9
34: 65 8b 05 2e ca 45 08 mov %gs:0x845ca2e(%rip),%eax # 0x845ca69
3b: 85 c0 test %eax,%eax
3d: 74 16 je 0x55
3f: 5b pop %rbx