From: sashiko-bot@kernel.org
To: "Ziyu Zhang" <ziyuzhang201@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2] IB/iser: Fix blocking connect hang and endpoint double free
Date: Tue, 24 Nov 2026 09:12:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-230793@kernel.org> (raw)
In-Reply-To: <20261124090121.77115-1-ziyuzhang201@gmail.com>
> iser_connect() waits for up_completion while holding
> iser_conn->state_mutex. The RDMA CM callback that advances the
> connection state machine needs the same mutex, so a blocking connect
> can never finish establishing and the wait only returns when a signal
> arrives. The caller then sits there with rx_queue_mutex held, which
> stalls the iscsi netlink path for the whole daemon.
>
> Dropping the mutex around the wait is not enough on its own:
> up_completion is only completed on RDMA_CM_EVENT_ESTABLISHED, so an
> address, route, connect or reject error still leaves the waiter asleep
> forever; complete it from iser_connect_error() as well. The cleanup
> events are the other way an attempt can end without an establishment:
> DISCONNECTED, ADDR_CHANGE, TIMEWAIT_EXIT and DEVICE_REMOVAL reach
> iser_cleanup_handler() with the connection still ISER_CONN_PENDING,
> where iser_conn_terminate() does nothing because it only acts on an
> [ ... ]
>
> Fixes: 504130c039f9 ("IB/iser: Protect iser state machine with a mutex")
> Fixes: 9a3119e4b787 ("IB/iser: Release the iscsi endpoint if ep_disconnect wasn't called")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziyu Zhang <ziyuzhang201@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124090121.77115-1-ziyuzhang201@gmail.com?part=1
prev parent reply other threads:[~2026-11-24 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 9:01 [PATCH v2] IB/iser: Fix blocking connect hang and endpoint double free Ziyu Zhang
2026-11-24 9:12 ` sashiko-bot [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=sashiko-outbox-230793@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=ziyuzhang201@gmail.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