Re: [PATCH v2] KVM: x86: Cancel PIT timer on failed creation
From: Sean Christopherson
Date: Fri Nov 13 2026 - 09:30:59 EST
On Tue, 06 Oct 2026 11:33:54 +0200, Bruno Produit wrote:
> Cancel the PIT hrtimer if PIT creation fails after registering the PIO
> device. This matches normal teardown and ensures the timer no longer
> uses the PIT before its memory is freed.
>
> KVM registers the PIT's PIO device before registering the optional dummy
> speaker device. If speaker registration fails, a vCPU can have already
> programmed channel 0 and armed pit_state.timer through the published PIT
> device. When I/O bus registration became fallible, its cleanup did not
> cancel the timer before freeing the PIT.
>
> [...]
Applied to kvm-x86 misc, thanks!
[1/1] KVM: x86: Cancel PIT timer on failed creation
https://github.com/kvm-x86/linux/commit/381a21cfe810
--
https://github.com/kvm-x86/linux/tree/next