From: "Cheatham, Benjamin" <benjamin.cheatham@amd.com>
To: Alison Schofield <alison.schofield@intel.com>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Cameron <jic23@kernel.org>,
Dave Jiang <dave.jiang@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ira Weiny <iweiny@kernel.org>, Li Ming <ming.li@zohomail.com>,
Richard Cheng <icheng@nvidia.com>
Cc: <linux-cxl@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] cxl/region: Reject a repeat write of an endpoint decoder to targetN
Date: Tue, 3 Nov 2026 15:27:13 -0600 [thread overview]
Message-ID: <3937a9f1-3775-4954-a1c3-e066e62efb09@amd.com> (raw)
In-Reply-To: <e8235faea3d75dbfd45f197fe657c467b6259705.1793724885.git.alison.schofield@intel.com>
On 11/3/2026 11:07 AM, Alison Schofield wrote:
> Writing an endpoint decoder to a region targetN attribute that already
> holds it returns -EBUSY, but leaves the partially populated region in an
> inconsistent state. The targetN attribute still names the decoder, so the
> failed write gives no indication that the region was damaged.
>
> Filling the remaining target positions can then trigger a NULL pointer
> dereference in cxl_region_setup_targets(). This can be reproduced through
> sysfs:
>
> echo $decoder > /sys/bus/cxl/devices/region0/target0
> echo $decoder > /sys/bus/cxl/devices/region0/target0
> echo $other_decoder > /sys/bus/cxl/devices/region0/target1
>
> An existing check recognizes the repeated assignment but incorrectly allows
> the attachment to proceed, damaging region state. Remove that check so the
> repeated write is rejected without disturbing the existing attachment,
> consistent with the documented targetN ABI.
>
> Fixes: 9995576cef48 ("cxl/region: Move region-position validation to a helper")
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
> ---
I didn't see this before I hit send on v3, you can disregard the comments on this patch there.
I skipped the Sashiko review and basically commented the same thing (whoops), and you fixed that
in this version, so:
Reviewed-by: Ben Cheatham <benjamin.cheatham@amd.com>
Thanks,
Ben
next prev parent reply other threads:[~2026-11-03 21:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 17:07 [PATCH v4 1/2] cxl/region: Reject a repeat write of an endpoint decoder to targetN Alison Schofield
2026-11-03 17:07 ` [PATCH v4 2/2] cxl/Documentation: Describe clearing a region targetN position Alison Schofield
2026-11-03 23:07 ` Dave Jiang
2026-11-04 3:19 ` Alison Schofield
2026-11-17 19:15 ` Dave Jiang
2026-11-03 21:27 ` Cheatham, Benjamin [this message]
2026-11-03 23:06 ` [PATCH v4 1/2] cxl/region: Reject a repeat write of an endpoint decoder to targetN Dave Jiang
2026-11-11 19:47 ` Jonathan Cameron
2026-11-16 22:12 ` Dave Jiang
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=3937a9f1-3775-4954-a1c3-e066e62efb09@amd.com \
--to=benjamin.cheatham@amd.com \
--cc=alison.schofield@intel.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=ming.li@zohomail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.