Re: [PATCH] KVM: irqchip: synchronize srcu only if needed

From: Yi Wang
Date: Tue Jan 16 2024 - 19:57:11 EST


On Wed, Jan 17, 2024 at 12:58 AM Sean Christopherson <seanjc@googlecom> wrote:
>
> On Tue, Jan 16, 2024, Christian Borntraeger wrote:
> >
> >

...

> >
> > I would be fine with wasted memory.
>
> +1. If we really, really want to avoid the negligible memory overhead, we could
> pre-configure a static global table and directly use that as the dummy table (and
> exempt it from being freed by free_irq_routing_table()).

Thanks for the suggestion! Well, in my opinion it may be better to fix
the current issue
and I'm glad to send another patch to optimize this.

> > The only question is does it have a functional impact or can we simply ignore
> > the dummy routing.
>
> Given the lack of sanity checks on kvm->irq_routing, I'm pretty sure the only way
> for there to be functional impact is if there's a latent NULL pointer deref hiding
> somewhere.


--
---
Best wishes
Yi Wang