Linux CXL
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: Li Ming <ming.li@zohomail.com>, danjwilliams <dan.j.williams@intel.com>
Cc: dave <dave@stgolabs.net>,
	jonathan.cameron <jonathan.cameron@huawei.com>,
	dave.jiang <dave.jiang@intel.com>,
	alison.schofield <alison.schofield@intel.com>,
	vishal.l.verma <vishal.l.verma@intel.com>,
	ira.weiny <ira.weiny@intel.com>,
	linux-cxl <linux-cxl@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] cxl/core: Set cxlmd->endpoint to NULL by default
Date: Tue, 3 Feb 2026 14:37:45 -0800	[thread overview]
Message-ID: <698278b96e1be_55fa10072@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <19c2413143b.107b011e88026.6653143171898793206@zohomail.com>

Li Ming wrote:
[..]
> Hi Dan,
> 
> Thanks for your proposal, I think your change can solve this problem too.
> But the change is a lot, and need more time to review all driver code
> to confirm if there are other places needed such checking. (I found
> that cxl_reset_done also needs some changes like you mentioned) Maybe
> we can consider my change as a quick fix? Then I can prepare a new
> patchset for the consolidation.

I am not convinced that it is a fix. The fact that you say the bug
disappears when patch2 is applied leads me to believe that is
potentially the only bug.

I.e. it may be the case that cxl_dpa_to_region() is safe to assume that
a valid ->endpoint pointer will remain valid once the port
bus_add_device() vs bus_probe_device() hole is plugged.

I would say start with patch2 by itself. Then circle back to prove
that a mere NULL check is a fix or just makes the vulnerability window
smaller and the locking rework is needed.

  reply	other threads:[~2026-02-03 22:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-01  9:30 [PATCH 0/2] Fix port enumeration failure and NULL endpoint issue Li Ming
2026-02-01  9:30 ` [PATCH 1/2] cxl/core: Set cxlmd->endpoint to NULL by default Li Ming
2026-02-02 14:41   ` Jonathan Cameron
2026-02-02 15:48     ` Gregory Price
2026-02-03 14:15     ` Li Ming
2026-02-02 21:04   ` Dave Jiang
2026-02-03 15:04     ` Li Ming
2026-02-03  0:01   ` dan.j.williams
2026-02-03 15:15     ` Li Ming
2026-02-03 22:37       ` dan.j.williams [this message]
2026-02-01  9:30 ` [PATCH 2/2] cxl/core: Hold grandparent port lock while dport adding Li Ming
2026-02-02 15:39   ` Jonathan Cameron
2026-02-03 14:23     ` Li Ming
2026-02-03 21:14       ` dan.j.williams
2026-02-02 16:31   ` Gregory Price
2026-02-03 14:33     ` Li Ming
2026-02-03  0:07   ` dan.j.williams
2026-02-03 15:21     ` Li Ming
2026-02-03 22:25       ` dan.j.williams
2026-02-04 13:51         ` 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=698278b96e1be_55fa10072@dwillia2-mobl4.notmuch \
    --to=dan.j.williams@intel.com \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox