Subject: Re: [PATCH] KVM/arm64: vgic-its: Fix memory leak when vgic_its_set_abi() fails

From: Oliver Upton <[email-masked]>
Date: Wed, 3 Jun 2026 23:41:44 -0700

On Thu, Jun 04, 2026 at 11:14:26AM +0800, Jackie Liu wrote:
> From: Jackie Liu <[email-masked]>
> 
> In vgic_its_create(), if vgic_its_set_abi() fails after allocating the
> its structure and setting kvm state, the allocated 'its' is leaked
> because the function returns without freeing it.
> 
> Fix by rolling back the kvm state flags and freeing the its structure
> when vgic_its_set_abi() returns an error.
> 
> Fixes: 71afe470e20d ("KVM: arm64: vgic-its: Introduce migration ABI infrastructure")
> Signed-off-by: Jackie Liu <[email-masked]>

vgic_its_set_abi() always succeeds so there's no actual memory leak
here. I'd prefer getting rid of the return value instead.

Thanks,
Oliver