From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-cxl@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
Dan Williams <dan.j.williams@intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Terry Bowman <terry.bowman@amd.com>
Subject: Re: [PATCH v7 1/2] acpi/ghes, cxl/pci: Process CXL CPER Protocol Errors
Date: Tue, 4 Mar 2025 14:57:31 -0500 [thread overview]
Message-ID: <20250304195731.GA1960804@yaz-khff2.amd.com> (raw)
In-Reply-To: <20250226221157.149406-2-Smita.KoralahalliChannabasappa@amd.com>
On Wed, Feb 26, 2025 at 10:11:56PM +0000, Smita Koralahalli wrote:
[...]
> +static void cxl_cper_handle_prot_err(struct cxl_cper_prot_err_work_data *data)
> +{
> + unsigned int devfn = PCI_DEVFN(data->prot_err.agent_addr.device,
> + data->prot_err.agent_addr.function);
> + struct pci_dev *pdev __free(pci_dev_put) =
> + pci_get_domain_bus_and_slot(data->prot_err.agent_addr.segment,
> + data->prot_err.agent_addr.bus,
> + devfn);
> +
> + guard(device)(&pdev->dev);
> + if (!pdev)
> + return;
> +
If 'pdev == NULL', then there would be a NULL pointer dereference in the
guard() statement, IIUC.
So I think the guard() statement should go after the NULL pointer check.
Thanks,
Yazen
next prev parent reply other threads:[~2025-03-04 19:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 22:11 [PATCH v7 0/2] acpi/ghes, cper, cxl: Process CXL CPER Protocol errors Smita Koralahalli
2025-02-26 22:11 ` [PATCH v7 1/2] acpi/ghes, cxl/pci: Process CXL CPER Protocol Errors Smita Koralahalli
2025-03-04 17:44 ` Ira Weiny
2025-03-05 0:56 ` Ira Weiny
2025-03-04 19:57 ` Yazen Ghannam [this message]
2025-03-04 20:16 ` Koralahalli Channabasappa, Smita
2025-02-26 22:11 ` [PATCH v7 2/2] cxl/pci: Add trace logging for CXL PCIe Port RAS errors Smita Koralahalli
2025-03-04 17:45 ` Ira Weiny
2025-03-04 18:56 ` Alison Schofield
2025-03-04 20:33 ` Koralahalli Channabasappa, Smita
2025-03-04 21:10 ` Alison Schofield
2025-03-04 21:21 ` Alison Schofield
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=20250304195731.GA1960804@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Smita.KoralahalliChannabasappa@amd.com \
--cc=alison.schofield@intel.com \
--cc=ardb@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=ira.weiny@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=terry.bowman@amd.com \
--cc=vishal.l.verma@intel.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