Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Dave Jiang <dave.jiang@intel.com>
Cc: <linux-cxl@vger.kernel.org>, <dave@stgolabs.net>,
	<jic23@kernel.org>, <ming.li@zohomail.com>, <icheng@nvidia.com>,
	<stable@vger.kernel.org>,
	Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>,
	"Gregory Price (Meta)" <gourry@gourry.net>
Subject: Re: [PATCH v3 1/3] cxl/port: Clear cached dport pointers when a dport is removed
Date: Wed, 30 Sep 2026 15:56:40 -0700	[thread overview]
Message-ID: <ar2TqGKJUZaIfICe@aschofie-mobl2.lan> (raw)
In-Reply-To: <20260930152311.4164036-2-dave.jiang@intel.com>

On Wed, Sep 30, 2026 at 08:23:09AM -0700, Dave Jiang wrote:
> Switch decoders cache dport pointers in cxlsd->target[], and nothing
> clears them when a dport is freed. Readers then dereference freed memory.
> 
> KASAN caught it under a cxl_test load/unload loop with concurrent sysfs
> reads (abbreviated).
> 
> Clear the matching slots from cxl_dport_remove(), walking the port's
> decoders the way cxl_port_update_decoder_targets() does on the add side.
> Scan all nr_targets slots, the target[] allocation size, and clear every
> hit.

Reviewed-by: Alison Schofield <alison.schofield@intel.com>


  reply	other threads:[~2026-09-30 22:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 15:23 [PATCH v3 0/3] cxl: dport fixes from sashiko reports Dave Jiang
2026-09-30 15:23 ` [PATCH v3 1/3] cxl/port: Clear cached dport pointers when a dport is removed Dave Jiang
2026-09-30 22:56   ` Alison Schofield [this message]
2026-09-30 15:23 ` [PATCH v3 2/3] cxl/core: Hold the dport host lock across dport lookup and use Dave Jiang
2026-09-30 15:40   ` sashiko-bot
2026-09-30 22:59   ` Alison Schofield
2026-10-01  1:47   ` Li Ming
2026-09-30 15:23 ` [PATCH v3 3/3] cxl/port: Attach endpoints to a dport under the lock that pins it Dave Jiang
2026-09-30 23:00   ` Alison Schofield
2026-10-01  1:59   ` Li Ming

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=ar2TqGKJUZaIfICe@aschofie-mobl2.lan \
    --to=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gourry@gourry.net \
    --cc=icheng@nvidia.com \
    --cc=jic23@kernel.org \
    --cc=jonathan.cameron@oss.qualcomm.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=stable@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