From: Jason Gunthorpe <jgg@nvidia.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: "Jack Morgenstein" <jackm@nvidia.com>,
"Feng Liu" <feliu@nvidia.com>,
"Håkon Bugge" <haakon.bugge@oracle.com>,
linux-rdma@vger.kernel.org,
"Patrisious Haddad" <phaddad@nvidia.com>,
"Sharath Srinivasan" <sharath.srinivasan@oracle.com>,
"Vlad Dumitrescu" <vdumitrescu@nvidia.com>
Subject: Re: [PATCH rdma-rc] RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work
Date: Mon, 26 May 2025 15:45:24 -0300 [thread overview]
Message-ID: <20250526184524.GA114945@nvidia.com> (raw)
In-Reply-To: <4f3640b501e48d0166f312a64fdadf72b059bd04.1747827103.git.leon@kernel.org>
On Wed, May 21, 2025 at 02:36:02PM +0300, Leon Romanovsky wrote:
> From: Jack Morgenstein <jackm@nvidia.com>
>
> The cited commit fixed a crash when cma_netevent_callback was called for
> a cma_id while work on that id from a previous call had not yet started.
> The work item was re-initialized in the second call, which corrupted the
> work item currently in the work queue.
>
> However, it left a problem when queue_work fails (because the item is
> still pending in the work queue from a previous call). In this case,
> cma_id_put (which is called in the work handler) is therefore not
> called. This results in a userspace process hang (zombie process).
>
> Fix this by calling cma_id_put() if queue_work fails.
>
> Fixes: 45f5dcdd0497 ("RDMA/cma: Fix workqueue crash in cma_netevent_work_handler")
> Signed-off-by: Jack Morgenstein <jackm@nvidia.com>
> Signed-off-by: Feng Liu <feliu@nvidia.com>
> Reviewed-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> Reviewed-by: Sharath Srinivasan <sharath.srinivasan@oracle.com>
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
> ---
> drivers/infiniband/core/cma.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to for-next, thanks
Jason
prev parent reply other threads:[~2025-05-26 18:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-21 11:36 [PATCH rdma-rc] RDMA/cma: Fix hang when cma_netevent_callback fails to queue_work Leon Romanovsky
2025-05-21 18:59 ` Sharath Srinivasan
2025-05-22 8:58 ` Leon Romanovsky
2025-05-22 16:54 ` Sharath Srinivasan
2025-05-22 3:51 ` Kalesh Anakkur Purayil
2025-05-26 18:45 ` 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=20250526184524.GA114945@nvidia.com \
--to=jgg@nvidia.com \
--cc=feliu@nvidia.com \
--cc=haakon.bugge@oracle.com \
--cc=jackm@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=phaddad@nvidia.com \
--cc=sharath.srinivasan@oracle.com \
--cc=vdumitrescu@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.