Linux CXL
 help / color / mirror / Atom feed
From: <dan.j.williams@intel.com>
To: Li Ming <ming.li@zohomail.com>, Dave Jiang <dave.jiang@intel.com>
Cc: <dave@stgolabs.net>, <jonathan.cameron@huawei.com>,
	<alison.schofield@intel.com>, <vishal.l.verma@intel.com>,
	<ira.weiny@intel.com>, <dan.j.williams@intel.com>,
	<linux-cxl@vger.kernel.org>
Subject: Re: [PATCH] cxl/region: Add decoder check to check_commit_order()
Date: Wed, 30 Apr 2025 22:29:15 -0700	[thread overview]
Message-ID: <681306aba4219_29cd5100c3@dwillia2-mobl4.notmuch> (raw)
In-Reply-To: <9516517f-9d04-423b-bcd0-123a76598c06@zohomail.com>

Li Ming wrote:
> On 5/1/2025 5:36 AM, Dave Jiang wrote:
> > check_commit_order() attempts to convert a device to a decoder without
> > making sure the device is a decoder. So far this has been working due
> > to pure luck. Issue discovered while doing deferred dport probing when
> > child ports are now in the midst of decoders due to ordering change
> > of child port additions. Add a check before attempting to do decoder
> > conversion.
> >
> > Fixes: 105b6235ad0f ("cxl/port: Prevent out-of-order decoder allocation")
> > Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> 
> I also have a patch for this issue during I worked on deferred dport probing.
> 
> https://lore.kernel.org/linux-cxl/20250107035708.1134954-4-ming.li@zohomail.com/
> 
> I am not sure if we should define it as a bug, my understanding is
> that it will never happen with current implementation, it only happens
> when we are trying to delay the switch decoders initialization.

Agree. This is not a fix. The current implementation is lucky that ports
are always registered after decoders. So there is zero exposure to this
issue for current kernels.

Dave, please just include this as a prep patch in the same series that
invalidates the port child device ordering assumption.

  reply	other threads:[~2025-05-01  5:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 21:36 [PATCH] cxl/region: Add decoder check to check_commit_order() Dave Jiang
2025-05-01  0:46 ` Alison Schofield
2025-05-01  2:51 ` Li Ming
2025-05-01  5:29   ` dan.j.williams [this message]
2025-05-01 15:09     ` 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=681306aba4219_29cd5100c3@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=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