From: Will Deacon <will@kernel.org>
To: Saurav Sachidanand <sauravsc@amazon.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Besar Wicaksono <bwicaksono@nvidia.com>,
Ilkka Koskinen <ilkka@os.amperecomputing.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
aghayev@amazon.com, juew@amazon.com
Subject: Re: [PATCH 2/3] perf/arm_cspmu: nvidia: handle empty resource list in PCIE-TGT init
Date: Mon, 1 Jun 2026 16:08:56 +0100 [thread overview]
Message-ID: <ah2giNU4ZYN45emt@willie-the-truck> (raw)
In-Reply-To: <20260511210905.91917-1-sauravsc@amazon.com>
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@amazon.com>
> ---
> 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@amazon.com/
Please can you post a v2, with all three patches and the R-b tags from
Besar?
Thanks,
Will
prev parent reply other threads:[~2026-06-01 15:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 21:09 [PATCH 2/3] perf/arm_cspmu: nvidia: handle empty resource list in PCIE-TGT init Saurav Sachidanand
2026-05-11 21:09 ` [PATCH 3/3] perf/arm_cspmu: nvidia: fix BDF calculation examples in PCIE PMU docs Saurav Sachidanand
2026-05-11 21:48 ` Besar Wicaksono
2026-05-11 22:09 ` [PATCH 2/3] perf/arm_cspmu: nvidia: handle empty resource list in PCIE-TGT init Besar Wicaksono
2026-06-01 15:08 ` Will Deacon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ah2giNU4ZYN45emt@willie-the-truck \
--to=will@kernel.org \
--cc=aghayev@amazon.com \
--cc=bwicaksono@nvidia.com \
--cc=ilkka@os.amperecomputing.com \
--cc=jonathanh@nvidia.com \
--cc=juew@amazon.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=sauravsc@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox