From: Qican Ma <goonsomeway@gmail.com>
To: mjambigi@linux.ibm.com
Cc: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com,
sidraya@linux.ibm.com, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, willemb@google.com,
linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net v4] net/smc: serialize clcsock release against CDC receive path
Date: Sun, 06 Dec 2026 23:17:26 +0800 [thread overview]
Message-ID: <179657024601.87770.10289400123103256144@gmail.com> (raw)
In-Reply-To: <16726245-1c75-4efa-b259-7d528ff58713@linux.ibm.com>
Hi Mahanta,
Thanks - v5 is out.
You are right about the corking overclaim: smc_tx_should_cork() also
requires sndbuf_space, and the copy happens before the cork check, so
returning true there does not prevent RDMA writes. v5 rewords the
commit message to state plainly that the guard only avoids the clcsock
dereference on a dying connection; transmit activity remains governed
by the existing EPIPE and conn->killed checks. I kept the guard as
cheap defense-in-depth rather than adding an early error return, since
sashiko's review raised a fair question about whether the cork path is
even reachable in practice and I did not want to expand the behavioral
surface on that uncertainty. Happy to drop it or upgrade it to an early
check if you prefer either.
v5 also addresses a regression risk the sashiko review found in the
reorder itself: the cancel_work_sync(&conn->abort_work) inside
smc_conn_free() previously ran after the lock-drop window around the
clcsock release, which gave a lock-starved abort_work a chance to
finish first. With the reorder that escape is gone, so v5 cancels
abort_work with the lock dropped in __smc_release() before calling
smc_conn_free(), mirroring smc_close_cancel_work(), and compensates the
scheduler's sock_hold() when the work is dequeued before running (both
there and in smc_conn_free()'s own cancel path, which had the same
leak). The remaining callers share the pre-existing deadlock pattern
either way; I left a note in the commit message that it deserves its
own fix.
Thanks,
Qican Ma
next prev parent reply other threads:[~2026-12-06 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 2:20 [PATCH net v4] net/smc: serialize clcsock release against CDC receive path Qican Ma
2026-12-04 6:36 ` Mahanta Jambigi
2026-12-06 15:17 ` Qican Ma [this message]
2026-12-05 3:05 ` netdev-bot+sashiko
2026-12-06 15:17 ` Qican Ma
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=179657024601.87770.10289400123103256144@gmail.com \
--to=goonsomeway@gmail.com \
--cc=alibuda@linux.alibaba.com \
--cc=dust.li@linux.alibaba.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mjambigi@linux.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sidraya@linux.ibm.com \
--cc=willemb@google.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