[PATCH 0/3] irqchip/gic-v3: Lifetime and range fixes in the GICv3 and ITS drivers

Fuad Tabba posted 3 patches 2 weeks, 3 days ago
drivers/irqchip/irq-gic-v3-its.c | 3 ++-
drivers/irqchip/irq-gic-v3.c     | 7 ++++---
2 files changed, 6 insertions(+), 4 deletions(-)
[PATCH 0/3] irqchip/gic-v3: Lifetime and range fixes in the GICv3 and ITS drivers
Posted by Fuad Tabba 2 weeks, 3 days ago
Hi folks,

Three fixes to the GICv3 and ITS drivers, from reviewing the GIC series
floating around and chasing down Sashiko's reports.

The first releases the partition node that gic_irq_get_fwspec_info()
takes from of_find_node_by_phandle() and never puts. Sashiko raised it
on an of/irq patch of mine, and I said a fix was forthcoming [1].

The second widens the per-device MSI clamp, which truncates to zero when
GITS_TYPER.ID_bits is at its maximum and then denies every MSI on that
ITS. I couldn't find an implementation that reports that maximum, so
this is one value at the edge rather than something anyone is hitting.
It carries Cc: stable because the commit it fixes was itself
backported, so drop the tag if you'd rather.

The third clears vpt_page once its_vpe_teardown() has freed it, so the
NULL guard holds if teardown runs again on the same vPE.

Based on Linux 7.3-rc2 (df2908090cda3).

Cheers,
/fuad

[1] https://lore.kernel.org/all/CA+EHjTx7eP_30vP47=UFk_wMAut-2uf+2DF-MZqn2SLE_k-8qg@mail.gmail.com/

Fuad Tabba (3):
  irqchip/gic-v3: Release the partition node in
    gic_irq_get_fwspec_info()
  irqchip/gic-v3-its: Don't clamp nvecs to zero when id_bits is 32
  irqchip/gic-v3-its: Clear vpt_page after freeing the pending table

 drivers/irqchip/irq-gic-v3-its.c | 3 ++-
 drivers/irqchip/irq-gic-v3.c     | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)


base-commit: df2908090cda368b01ff43709f51890076c56157
-- 
2.39.5
Re: [PATCH 0/3] irqchip/gic-v3: Lifetime and range fixes in the GICv3 and ITS drivers
Posted by Zenghui Yu 5 days, 12 hours ago
Hi Fuad,

On 9/8/26 10:26 PM, Fuad Tabba wrote:
> Hi folks,
> 
> Three fixes to the GICv3 and ITS drivers, from reviewing the GIC series
> floating around and chasing down Sashiko's reports.
> 
> The first releases the partition node that gic_irq_get_fwspec_info()
> takes from of_find_node_by_phandle() and never puts. Sashiko raised it
> on an of/irq patch of mine, and I said a fix was forthcoming [1].
> 
> The second widens the per-device MSI clamp, which truncates to zero when
> GITS_TYPER.ID_bits is at its maximum and then denies every MSI on that
> ITS. I couldn't find an implementation that reports that maximum, so
> this is one value at the edge rather than something anyone is hitting.
> It carries Cc: stable because the commit it fixes was itself
> backported, so drop the tag if you'd rather.
> 
> The third clears vpt_page once its_vpe_teardown() has freed it, so the
> NULL guard holds if teardown runs again on the same vPE.
> 
> Based on Linux 7.3-rc2 (df2908090cda3).
> 
> Cheers,
> /fuad
> 
> [1] https://lore.kernel.org/all/CA+EHjTx7eP_30vP47=UFk_wMAut-2uf+2DF-MZqn2SLE_k-8qg@mail.gmail.com/
> 
> Fuad Tabba (3):
>   irqchip/gic-v3: Release the partition node in
>     gic_irq_get_fwspec_info()
>   irqchip/gic-v3-its: Don't clamp nvecs to zero when id_bits is 32
>   irqchip/gic-v3-its: Clear vpt_page after freeing the pending table
> 
>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>  drivers/irqchip/irq-gic-v3.c     | 7 ++++---
>  2 files changed, 6 insertions(+), 4 deletions(-)

All look good to me.  Thanks for the fixes!

Reviewed-by: Zenghui Yu (Huawei) <zenghui.yu@linux.dev>

Zenghui
Re: [PATCH 0/3] irqchip/gic-v3: Lifetime and range fixes in the GICv3 and ITS drivers
Posted by Radu Rendec 6 days, 5 hours ago
On Tue, 2026-09-08 at 15:26 +0100, Fuad Tabba wrote:
> Hi folks,
> 
> Three fixes to the GICv3 and ITS drivers, from reviewing the GIC series
> floating around and chasing down Sashiko's reports.
> 
> The first releases the partition node that gic_irq_get_fwspec_info()
> takes from of_find_node_by_phandle() and never puts. Sashiko raised it
> on an of/irq patch of mine, and I said a fix was forthcoming [1].
> 
> The second widens the per-device MSI clamp, which truncates to zero when
> GITS_TYPER.ID_bits is at its maximum and then denies every MSI on that
> ITS. I couldn't find an implementation that reports that maximum, so
> this is one value at the edge rather than something anyone is hitting.
> It carries Cc: stable because the commit it fixes was itself
> backported, so drop the tag if you'd rather.
> 
> The third clears vpt_page once its_vpe_teardown() has freed it, so the
> NULL guard holds if teardown runs again on the same vPE.
> 
> Based on Linux 7.3-rc2 (df2908090cda3).
> 
> Cheers,
> /fuad
> 
> [1] https://lore.kernel.org/all/CA+EHjTx7eP_30vP47=UFk_wMAut-2uf+2DF-MZqn2SLE_k-8qg@mail.gmail.com/
> 
> Fuad Tabba (3):
>   irqchip/gic-v3: Release the partition node in
>     gic_irq_get_fwspec_info()
>   irqchip/gic-v3-its: Don't clamp nvecs to zero when id_bits is 32
>   irqchip/gic-v3-its: Clear vpt_page after freeing the pending table
> 
>  drivers/irqchip/irq-gic-v3-its.c | 3 ++-
>  drivers/irqchip/irq-gic-v3.c     | 7 ++++---
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> 
> base-commit: df2908090cda368b01ff43709f51890076c56157

Reviewed-by: Radu Rendec <radu@rendec.net>
Re: [PATCH 0/3] irqchip/gic-v3: Lifetime and range fixes in the GICv3 and ITS drivers
Posted by Marc Zyngier 2 weeks, 2 days ago
On Tue, 08 Sep 2026 15:26:29 +0100,
Fuad Tabba <fuad.tabba@linux.dev> wrote:
> 
> Hi folks,
> 
> Three fixes to the GICv3 and ITS drivers, from reviewing the GIC series
> floating around and chasing down Sashiko's reports.
> 
> The first releases the partition node that gic_irq_get_fwspec_info()
> takes from of_find_node_by_phandle() and never puts. Sashiko raised it
> on an of/irq patch of mine, and I said a fix was forthcoming [1].
> 
> The second widens the per-device MSI clamp, which truncates to zero when
> GITS_TYPER.ID_bits is at its maximum and then denies every MSI on that
> ITS. I couldn't find an implementation that reports that maximum, so
> this is one value at the edge rather than something anyone is hitting.
> It carries Cc: stable because the commit it fixes was itself
> backported, so drop the tag if you'd rather.
> 
> The third clears vpt_page once its_vpe_teardown() has freed it, so the
> NULL guard holds if teardown runs again on the same vPE.
> 
> Based on Linux 7.3-rc2 (df2908090cda3).

Reviewed-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.