From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Patrisious Haddad <phaddad@nvidia.com>,
Artemy Kovalyov <artemyko@mellanox.com>,
linux-rdma@vger.kernel.org
Subject: Re: [PATCH rdma-next v1] RDMA/mlx5: Fix implicit ODP use after free
Date: Tue, 21 Jan 2025 14:14:04 -0400 [thread overview]
Message-ID: <20250121181404.GA883574@nvidia.com> (raw)
In-Reply-To: <c96b8645a81085abff739e6b06e286a350d1283d.1737274283.git.leon@kernel.org>
On Sun, Jan 19, 2025 at 10:21:41AM +0200, Leon Romanovsky wrote:
> From: Patrisious Haddad <phaddad@nvidia.com>
>
> Prevent double queueing of implicit ODP mr destroy work by using
> __xa_cmpxchg() to make sure, this is the first and last time we are
> destroying this specific mr.
>
> Without this change, we could try to invalidate this mr twice, which in
> turn could result in queuing a MR work destroy twice, and eventually the
> second work could execute after the MR was freed due to the first work,
> causing a user after free and trace below.
>
> drivers/infiniband/hw/mlx5/odp.c | 25 ++++++++++++++++---------
> 1 file changed, 16 insertions(+), 9 deletions(-)
Applied to for-next with the change I noted
Thanks,
Jason
prev parent reply other threads:[~2025-01-21 18:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-19 8:21 [PATCH rdma-next v1] RDMA/mlx5: Fix implicit ODP use after free Leon Romanovsky
2025-01-20 18:49 ` Jason Gunthorpe
2025-01-21 8:39 ` Leon Romanovsky
2025-01-21 18:14 ` Jason Gunthorpe [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=20250121181404.GA883574@nvidia.com \
--to=jgg@nvidia.com \
--cc=artemyko@mellanox.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=phaddad@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.