Re: [PATCH] KVM: arm64: Fix memory leaks from stage2 pagetable

From: Qian Cai
Date: Tue May 31 2022 - 13:23:37 EST


On Tue, May 31, 2022 at 05:57:11PM +0100, Will Deacon wrote:
> On Thu, May 26, 2022 at 04:39:56PM -0400, Qian Cai wrote:
> > Running some SR-IOV workloads could trigger some leak reports from
> > kmemleak.
> >
> > unreferenced object 0xffff080243cef500 (size 128):
> > comm "qemu-system-aar", pid 179935, jiffies 4298359506 (age 1629.732s)
> > hex dump (first 32 bytes):
> > 28 00 00 00 01 00 00 00 00 e0 4c 52 03 08 ff ff (.........LR....
> > e0 af a4 7f 7c d1 ff ff a8 3c b3 08 00 80 ff ff ....|....<......
> > backtrace:
> > kmem_cache_alloc_trace
> > kvm_init_stage2_mmu
>
> Hmm, I can't spot a 128-byte allocation in here so this is pretty cryptic.
> I don't really like the idea of papering over the report; we'd be better off
> trying to reproduce it.

As far as I would like to reproduce, I have tried it in the last a few
weeks without luck. It still happens from time to time though from our
daily CI, so I was thinking to plug the knowns leaks first.