From: sashiko-bot@kernel.org
To: "Mahanta Jambigi" <mjambigi@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH net-next v2 1/3] net/smc: keep clcsock until socket release
Date: Wed, 25 Nov 2026 07:50:22 +0000 [thread overview]
Message-ID: <sashiko-outbox-232834@kernel.org> (raw)
In-Reply-To: <20261124074927.3622245-2-mjambigi@linux.ibm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] net/smc: missing Fixes trailers for clcsock asynchronous release
fix
--
commit ff1c66913cdc1e51d673fa46e01a60e2f0984410
Author: Mahanta Jambigi <mjambigi@linux.ibm.com>
> net/smc: keep clcsock until socket release
>
> The clcsock of an SMC socket can be freed from asynchronous contexts:
> link group termination reaches smc_close_active_abort() and peer close
> reaches smc_close_passive_work(), and both can run while the socket is
> referenced by an open file. A task that uses the fd then operates on a
> released socket; this was found by code inspection, not from a reported
> regression.
>
> Free the clcsock only when no socket file can reference it: from the
> release paths, and from the abnormal close paths only once the socket
> has no file left. __smc_release() now tears the connection down before
> releasing the clcsock, which is safe because smc_conn_kill() and
> smc_close_passive_work() return early once conn->freed is set, so a
> clcsock can stay allocated until the application closes the socket.
>
> Signed-off-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
[Severity: Low]
This fixes premature clcsock release while a socket file is still open,
introduced in __smc_release() and smc_close_passive_work() by
b03faa1fafc8 ("net/smc: postpone release of clcsock") and in
smc_close_active_abort() by 81cf4f4707af ("net/smc: remove close abort
worker") and 42bfba9eaa33 ("net/smc: immediate termination for SMCD link
groups"). Should the commit message include these Fixes: tags?
Fixes: b03faa1fafc8 ("net/smc: postpone release of clcsock")
Fixes: 81cf4f4707af ("net/smc: remove close abort worker")
Fixes: 42bfba9eaa33 ("net/smc: immediate termination for SMCD link groups")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124074927.3622245-1-mjambigi@linux.ibm.com?part=1
next prev parent reply other threads:[~2026-11-25 7:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 7:49 [PATCH net-next v2 0/3] net/smc: fix clcsock lifetime vs asynchronous paths Mahanta Jambigi
2026-11-24 7:49 ` [PATCH net-next v2 1/3] net/smc: keep clcsock until socket release Mahanta Jambigi
2026-11-25 7:50 ` sashiko-bot [this message]
2026-11-24 7:49 ` [PATCH net-next v2 2/3] net/smc: remove the clcsock release lock Mahanta Jambigi
2026-11-24 7:49 ` [PATCH net-next v2 3/3] net/smc: document the clcsock lifetime Mahanta Jambigi
2026-11-25 7:50 ` [PATCH net-next v2 0/3] net/smc: fix clcsock lifetime vs asynchronous paths sashiko-bot
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-232834@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=sashiko-reviews@lists.linux.dev \
/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