From: Alejandro Lucero Palau <alucerop@amd.com>
To: Gregory Price <gourry@gourry.net>
Cc: linux-cxl@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 21/22] sfc: create cxl region
Date: Fri, 20 Feb 2026 08:00:00 +0000 [thread overview]
Message-ID: <f989697a-b78a-4225-b939-14afd623a322@amd.com> (raw)
In-Reply-To: <20260213161410.2945294-2-gourry@gourry.net>
On 2/13/26 16:14, Gregory Price wrote:
> This review was generated by kreview-0811365ff2.
>
> This is not an automated email, the reviewer though this report
> looked valid enough to consider discussion.
>
> ----
> sfc code so won't speak to the internals, but ordering question seems
> legit.
Hi Gregory,
Yes, it makes sense and pointing out to those changes introduced in v22
and mainly in v23.
I'll fix it.
Regarding the below comment, which if I am not wrong comes from kreview,
I think the patchset needs to support both cases and therefore the code
needs to deal with both module exit paths.
Thank you
>
> ~Gregory
> ----
>
> On Sat, Feb 01, 2026, Alejandro Lucero wrote:
>
>> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
>> index 2cfd0a46225f..4d5f3974e51d 100644
>> --- a/drivers/net/ethernet/sfc/efx_cxl.c
>> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
> [ ... ]
>
>> @@ -147,11 +155,11 @@ void efx_cxl_exit(struct efx_probe_data *probe_data)
>>
>> if (probe_data->cxl->hdm_was_committed) {
>> iounmap(probe_data->cxl->ctpio_cxl);
>> - cxl_unregister_region(probe_data->cxl->efx_region);
>> } else {
>> cxl_dpa_free(probe_data->cxl->cxled);
>> cxl_put_root_decoder(probe_data->cxl->cxlrd);
>> }
>> + cxl_unregister_region(probe_data->cxl->efx_region);
> In the non-committed path, cxl_dpa_free() is called while the
> endpoint decoder is still attached to the region. Looking at
> cxl_dpa_free() in drivers/cxl/core/hdm.c:
>
> if (cxled->cxld.region) {
> dev_dbg(dev, "decoder assigned to: %s\n",
> dev_name(&cxled->cxld.region->dev));
> return -EBUSY;
> }
>
> Since cxl_unregister_region() has not run yet, cxled->cxld.region
> is still set, and cxl_dpa_free() returns -EBUSY without freeing
> the DPA. The return value is not checked.
>
> Should cxl_unregister_region() be called before cxl_dpa_free()
> and cxl_put_root_decoder() in the else branch, matching the
> reverse order of allocation in efx_cxl_init()?
>
> The cover letter notes that v23 expects committed decoders as the
> primary flow, and uncommitted decoder support is deferred to
> follow-up work, so this else branch may not be reachable in
> practice today. Still worth fixing the ordering now so it
> doesn't bite when the uncommitted path is enabled later.
>
> This issue is not fixed by the remaining commits in the series
> (through 10fe989f9e85).
next prev parent reply other threads:[~2026-02-20 8:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260201155438.2664640-1-alejandro.lucero-palau@amd.com>
[not found] ` <20260201155438.2664640-15-alejandro.lucero-palau@amd.com>
2026-02-13 16:14 ` [PATCH 14/22] cxl: Define a driver interface for DPA allocation Gregory Price
2026-02-16 12:34 ` Alejandro Lucero Palau
[not found] ` <20260201155438.2664640-22-alejandro.lucero-palau@amd.com>
2026-02-13 16:14 ` [PATCH 21/22] sfc: create cxl region Gregory Price
2026-02-20 8:00 ` Alejandro Lucero Palau [this message]
[not found] ` <20260201155438.2664640-23-alejandro.lucero-palau@amd.com>
2026-02-13 16:14 ` [PATCH 22/22] sfc: support pio mapping based on cxl Gregory Price
2026-02-20 8:04 ` Alejandro Lucero Palau
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=f989697a-b78a-4225-b939-14afd623a322@amd.com \
--to=alucerop@amd.com \
--cc=gourry@gourry.net \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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
all inboxes | Powered by JetHome®