From: Chenguang Zhao <chenguang.zhao@linux.dev>
To: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
Cc: Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
saeedm@nvidia.com, tariqt@nvidia.com
Subject: Re: [PATCH rdma] RDMA/mlx5: Cancel deferred page-fault EQ work before teardown
Date: Thu, 8 Oct 2026 13:47:33 +0800 [thread overview]
Message-ID: <20261008054733.GA256585@pc> (raw)
In-Reply-To: <20261007234216.2765-1-prathameshdeshpande7@gmail.com>
On Thu, Oct 08, 2026 at 12:42:11AM +0100, Prathamesh Deshpande wrote:
> Page-fault EQ work can remain queued after the notifier is disabled.
> Destroying the EQ before cancelling that work can let the worker access
> freed EQ memory.
>
> Cancel the deferred work before destroying the EQ.
>
> Fixes: d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA")
> Signed-off-by: Prathamesh Deshpande <prathameshdeshpande7@gmail.com>
> ---
> drivers/infiniband/hw/mlx5/odp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
> index b8618610737a..1f28c30095dc 100644
> --- a/drivers/infiniband/hw/mlx5/odp.c
> +++ b/drivers/infiniband/hw/mlx5/odp.c
> @@ -1885,8 +1885,8 @@ mlx5_ib_odp_destroy_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq)
> if (!eq->core)
> return 0;
> mlx5_eq_disable(dev->mdev, eq->core, &eq->irq_nb);
> - err = mlx5_eq_destroy_generic(dev->mdev, eq->core);
> cancel_work_sync(&eq->work);
> + err = mlx5_eq_destroy_generic(dev->mdev, eq->core);
> destroy_workqueue(eq->wq);
> mempool_destroy(eq->pool);
>
> --
> 2.43.0
>
Looks correct.
Reviewed-by: Chenguang Zhao <zhaochenguang@kylinos.cn>
prev parent reply other threads:[~2026-10-08 5:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 23:42 Prathamesh Deshpande
2026-10-08 5:47 ` Chenguang Zhao [this message]
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=20261008054733.GA256585@pc \
--to=chenguang.zhao@linux.dev \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=prathameshdeshpande7@gmail.com \
--cc=saeedm@mellanox.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@mellanox.com \
--cc=tariqt@nvidia.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
all inboxes | Powered by JetHome®