Re: [PATCH 2/3] perf/arm_cspmu: nvidia: handle empty resource list in PCIE-TGT init

From: Will Deacon

Date: Mon Jun 01 2026 - 11:09:51 EST


On Mon, May 11, 2026 at 09:09:04PM +0000, Saurav Sachidanand wrote:
> When acpi_dev_get_memory_resources() returns success but the resource
> list is empty (rentry is NULL), addr_filter_reg remains NULL from
> devm_kzalloc. Since IS_ERR(NULL) is false, the function proceeds
> without error and later dereferences the NULL pointer in
> pcie_tgt_pmu_config_addr_filter().
>
> Set addr_filter_reg to ERR_PTR(-ENODEV) when the resource list is
> empty so the existing IS_ERR check catches it.
>
> Fixes: 3dd73022306b ("perf/arm_cspmu: nvidia: Add Tegra410 PCIE-TGT PMU")
> Signed-off-by: Saurav Sachidanand <sauravsc@xxxxxxxxxx>
> ---
> drivers/perf/arm_cspmu/nvidia_cspmu.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)

What happened to patch 1/3? I don't have it in my inbox and it seems to
be missing from the archive as well:

https://lore.kernel.org/all/20260511210905.91917-2-sauravsc@xxxxxxxxxx/

Please can you post a v2, with all three patches and the R-b tags from
Besar?

Thanks,

Will