public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Gregory Price <gourry@gourry.net>
Cc: <linux-cxl@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<kernel-team@meta.com>, <dave@stgolabs.net>,
	<dave.jiang@intel.com>, <alison.schofield@intel.com>,
	<vishal.l.verma@intel.com>, <ira.weiny@intel.com>,
	<dan.j.williams@intel.com>
Subject: Re: [PATCH v4 1/3] cxl/core/region: move pmem region driver logic into region_pmem.c
Date: Mon, 23 Mar 2026 17:58:44 +0000	[thread overview]
Message-ID: <20260323175844.000073cf@huawei.com> (raw)
In-Reply-To: <acFgpwOgw5glyHsY@gourry-fedora-PF4VCD3F>

On Mon, 23 Mar 2026 10:47:51 -0500
Gregory Price <gourry@gourry.net> wrote:

> On Mon, Mar 23, 2026 at 03:08:47PM +0000, Jonathan Cameron wrote:
> > On Sun, 22 Mar 2026 09:16:36 -0400
> > Gregory Price <gourry@gourry.net> wrote:
> >   
> > > +	scoped_guard(device, &cxl_nvb->dev) {
> > > +		if (cxl_nvb->dev.driver)
> > > +			rc = devm_add_action_or_reset(&cxl_nvb->dev,
> > > +					cxlr_pmem_unregister,
> > > +					cxlr_pmem);
> > > +		else
> > > +			rc = -ENXIO;  
> > As an example. If we happen to take this path... Where is the device_add() undone?  
> 
> In many other parts of the code, device_add is not rolled back either
> "for reasons", and - depending on who you talk to - this is
> intentional... for debugging?
> 
> I dunno, but the "hanging objects on failure" thing is common throughout
> cxl/ - :shrug:

If it were consistent maybe, but in other paths in this function it is cleaned up...
So I call bug even if it's one that is relatively unlikely to actually happen.

J
> 
> ~Gregory


  reply	other threads:[~2026-03-23 17:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-22 13:16 [PATCH v4 0/3] pull region-specific logic into new files Gregory Price
2026-03-22 13:16 ` [PATCH v4 1/3] cxl/core/region: move pmem region driver logic into region_pmem.c Gregory Price
2026-03-23  2:37   ` Alison Schofield
2026-03-23  5:37     ` Gregory Price
2026-03-24  3:49       ` Alison Schofield
2026-03-24 15:11         ` Gregory Price
2026-03-23 15:08   ` Jonathan Cameron
2026-03-23 15:47     ` Gregory Price
2026-03-23 17:58       ` Jonathan Cameron [this message]
2026-03-25  1:31   ` Alison Schofield
2026-03-22 13:16 ` [PATCH v4 2/3] cxl/core/region: move dax region device logic into region_dax.c Gregory Price
2026-03-23 15:11   ` Jonathan Cameron
2026-03-25  1:31   ` Alison Schofield
2026-03-22 13:16 ` [PATCH v4 3/3] cxl/core: use cleanup.h for devm_cxl_add_dax_region Gregory Price
2026-03-23 12:17   ` Jonathan Cameron
2026-03-25  1:33   ` Alison Schofield
2026-03-26 16:28 ` [PATCH v4 0/3] pull region-specific logic into new files Ira Weiny
2026-03-26 16:34   ` Gregory Price

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=20260323175844.000073cf@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=alison.schofield@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=gourry@gourry.net \
    --cc=ira.weiny@intel.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