Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>, <linux-cxl@vger.kernel.org>,
	<ira.weiny@intel.com>, <vishal.l.verma@intel.com>,
	<alison.schofield@intel.com>
Subject: Re: [PATCH v2 2/4] cxl: add missing return to cdat read error path
Date: Mon, 15 May 2023 11:03:51 +0100	[thread overview]
Message-ID: <20230515110351.00007567@Huawei.com> (raw)
In-Reply-To: <645d816a18c74_1e6f2942f@dwillia2-xfh.jf.intel.com.notmuch>

On Thu, 11 May 2023 16:59:38 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> Dave Jiang wrote:
> > Add a return to the error path when cxl_cdat_read_table() fails. Current
> > code continues with the table pointer points to freed memory.  
> 
> Yikes, at least the attribute is BIN_ATTR_ADMIN_RO(), but still bad.
> Will mark this as an urgent fix.

I see it's already gone upstream but fwiw

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I first thought we were saved because the cdat_length parameter
would be set to 0, but nope, that will have the value from the
earlier cxl_cdat_get_length() so if that succeeds and the later
table readout doesn't we indeed end up in a mess..



  reply	other threads:[~2023-05-15 10:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 17:58 [PATCH v2 0/4] cxl: Prep for QoS class support Dave Jiang
2023-05-11 17:58 ` [PATCH v2 1/4] cxl: Export QTG ids from CFMWS to sysfs as qos_class attribute Dave Jiang
2023-05-11 23:56   ` Dan Williams
2023-05-11 17:58 ` [PATCH v2 2/4] cxl: add missing return to cdat read error path Dave Jiang
2023-05-11 23:59   ` Dan Williams
2023-05-15 10:03     ` Jonathan Cameron [this message]
2023-05-11 17:59 ` [PATCH v2 3/4] cxl: Add checksum verification to CDAT from CXL Dave Jiang
2023-05-12 21:38   ` Dan Williams
2023-05-12 22:01     ` [PATCH v3] " Dave Jiang
2023-05-11 17:59 ` [PATCH v2 4/4] cxl: Add support for reading CXL switch CDAT table Dave Jiang
2023-05-12 21:39   ` Dan Williams
2023-05-12 19:00 ` [PATCH v2 0/4] cxl: Prep for QoS class support Davidlohr Bueso

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=20230515110351.00007567@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=ira.weiny@intel.com \
    --cc=linux-cxl@vger.kernel.org \
    --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