[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6887a3482072a_11968100ac@dwillia2-mobl4.notmuch>
Date: Mon, 28 Jul 2025 09:20:24 -0700
From: <dan.j.williams@...el.com>
To: <alejandro.lucero-palau@....com>, <linux-cxl@...r.kernel.org>,
<netdev@...r.kernel.org>, <dan.j.williams@...el.com>, <edward.cree@....com>,
<davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <dave.jiang@...el.com>
CC: Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCH v17 20/22] sfc: create cxl region
alejandro.lucero-palau@ wrote:
> From: Alejandro Lucero <alucerop@....com>
>
> Use cxl api for creating a region using the endpoint decoder related to
> a DPA range.
>
> Add a callback for unwinding sfc cxl initialization when the endpoint port
> is destroyed by potential cxl_acpi or cxl_mem modules removal.
>
> Signed-off-by: Alejandro Lucero <alucerop@....com>
> ---
> drivers/net/ethernet/sfc/efx_cxl.c | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/sfc/efx_cxl.c b/drivers/net/ethernet/sfc/efx_cxl.c
> index ffbf0e706330..7365effe974e 100644
> --- a/drivers/net/ethernet/sfc/efx_cxl.c
> +++ b/drivers/net/ethernet/sfc/efx_cxl.c
> @@ -18,6 +18,16 @@
>
> #define EFX_CTPIO_BUFFER_SIZE SZ_256M
>
> +static void efx_release_cxl_region(void *priv_cxl)
> +{
> + struct efx_probe_data *probe_data = priv_cxl;
> + struct efx_cxl *cxl = probe_data->cxl;
> +
> + iounmap(cxl->ctpio_cxl);
There is no synchronization here. If someone unbinds the a cxl_port
while the driver is using @ctpio_cxl, it looks it will cause a crash.
The loss of CXL connectivity after the driver has already committed to
it likely means that the whole driver needs to be shutdown, not just
this region cleanup.
Powered by blists - more mailing lists