public inbox for linux-cxl@vger.kernel.org
 help / color / mirror / Atom feed
From: Gregory Price <gourry@gourry.net>
To: dan.j.williams@intel.com
Cc: linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, dave@stgolabs.net,
	jonathan.cameron@huawei.com, dave.jiang@intel.com,
	alison.schofield@intel.com, vishal.l.verma@intel.com,
	ira.weiny@intel.com
Subject: Re: [PATCH v3] cxl/memdev: fix deadlock in cxl_memdev_autoremove() on attach failure
Date: Fri, 13 Feb 2026 00:19:50 -0500	[thread overview]
Message-ID: <aY60dhq_3witwbLN@gourry-fedora-PF4VCD3F> (raw)
In-Reply-To: <698e97998a33f_1cc5100e5@dwillia2-mobl4.notmuch>

On Thu, Feb 12, 2026 at 07:16:41PM -0800, dan.j.williams@intel.com wrote:
> Gregory Price wrote:
> > cxl_memdev_autoremove() takes device_lock(&cxlmd->dev) via guard(device)
> > and then calls cxl_memdev_unregister() when the attach callback was
> > provided but cxl_mem_probe() failed to bind.
> > 
> > cxl_memdev_unregister() calls
> >   cdev_device_del()
> >     device_del()
> >       bus_remove_device()
> >         device_release_driver()
> > 
> > This path is reached when a driver uses the @attach parameter to
> > devm_cxl_add_memdev() and the CXL topology fails to enumerate (e.g.
> > DVSEC range registers decode outside platform-defined CXL ranges,
> > causing the endpoint port probe to fail).
> > 
> > Add cxl_memdev_attach_failed() to set the scope of the check correctly.
> > 
> > Fixes: 29317f8dc6ed ("cxl/mem: Introduce cxl_memdev_attach for CXL-dependent operation")
> > Signed-off-by: Gregory Price <gourry@gourry.net>
> 
> Looks good,
> 
> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
> 
> This was a kreview find? Would it make sense to do something like
> "Reported-by: kreview-<git sha>"?

Technically it's a combination of Claude using kreview, but I think this
is reasonable since Claude falls over on some of this without the
prompts.

If that's something we want:

Reported-by: kreview-c94b85d6d2

  reply	other threads:[~2026-02-13  5:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 19:22 [PATCH v3] cxl/memdev: fix deadlock in cxl_memdev_autoremove() on attach failure Gregory Price
2026-02-11 20:59 ` Davidlohr Bueso
2026-02-13  3:16 ` dan.j.williams
2026-02-13  5:19   ` Gregory Price [this message]
2026-02-23 22:33 ` 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=aY60dhq_3witwbLN@gourry-fedora-PF4VCD3F \
    --to=gourry@gourry.net \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=ira.weiny@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=kernel-team@meta.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@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