From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "bwidawsk@kernel.org" <bwidawsk@kernel.org>,
"Schofield, Alison" <alison.schofield@intel.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"leitao@debian.org" <leitao@debian.org>,
"Weiny, Ira" <ira.weiny@intel.com>
Cc: "Jiang, Dave" <dave.jiang@intel.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] cxl/acpi: Do not swallow errors
Date: Fri, 14 Jul 2023 22:33:27 +0000 [thread overview]
Message-ID: <bef6ee32461ed5000d0f21b2c33405a9704461c7.camel@intel.com> (raw)
In-Reply-To: <20230714093146.2253438-2-leitao@debian.org>
On Fri, 2023-07-14 at 02:31 -0700, Breno Leitao wrote:
> Driver initialization is returning success (return 0) even if the
> initialization (cxl_decoder_add() or acpi_table_parse_cedt()) failed,
> and the hardware was already released (put_device()).
>
> Return the error instead of swallowing it.
>
> Fixes: f4ce1f766f1e ("cxl/acpi: Convert CFMWS parsing to ACPI sub-table helpers")
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
FYI there should not be a blank line between the Fixes tag and other
tags (Patch 1 has it right). This can break git's view of the trailers.
I fixed this up while applying and while at it did a bit of commit
message massaging for both patches.
> ---
> drivers/cxl/acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
> index 642983da01cb..815b43859c16 100644
> --- a/drivers/cxl/acpi.c
> +++ b/drivers/cxl/acpi.c
> @@ -298,7 +298,7 @@ static int cxl_parse_cfmws(union acpi_subtable_headers *header, void *arg,
> if (rc) {
> dev_err(dev, "Failed to add decode range [%#llx - %#llx]\n",
> res->start, res->end);
> - return 0;
> + return rc;
> }
> dev_dbg(dev, "add: %s node: %d range [%#llx - %#llx]\n",
> dev_name(&cxld->dev),
next prev parent reply other threads:[~2023-07-14 22:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 9:31 [PATCH v3 1/2] cxl/acpi: Fix UAF in the error path Breno Leitao
2023-07-14 9:31 ` [PATCH v3 2/2] cxl/acpi: Do not swallow errors Breno Leitao
2023-07-14 20:50 ` Alison Schofield
2023-07-14 22:33 ` Verma, Vishal L [this message]
2023-07-14 20:50 ` [PATCH v3 1/2] cxl/acpi: Fix UAF in the error path Alison Schofield
2023-07-15 3:16 ` Dan Williams
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=bef6ee32461ed5000d0f21b2c33405a9704461c7.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=ira.weiny@intel.com \
--cc=leitao@debian.org \
--cc=linux-cxl@vger.kernel.org \
/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