From: Qican Ma <goonsomeway@gmail.com>
To: netdev-bot+sashiko@kernel.org
Cc: alibuda@linux.alibaba.com, dust.li@linux.alibaba.com,
sidraya@linux.ibm.com, mjambigi@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:11 +0800 [thread overview]
Message-ID: <179657023158.87613.10037394445377927017@gmail.com> (raw)
In-Reply-To: <179643993329.3146.692765287538829589@kernel.org>
Hi,
Thanks for the detailed review. I have sent v5 addressing these points.
On the first High issue (abort_work deadlock timing): the analysis is
correct. Moving smc_conn_free() ahead of the clcsock release also moves
its cancel_work_sync(&conn->abort_work) ahead of the lock-drop window
that previously let a lock-starved abort_work complete, and
smc_conn_abort_work() does take lock_sock() first. 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. The
same sock_hold() leak in smc_conn_free()'s own cancel path is fixed as
well. The remaining smc_conn_free() callers share the pre-existing
deadlock pattern regardless of this patch; I agree it deserves a
separate fix and this patch does not make it worse than those paths.
On the second High issue (smc_accept_dequeue()): correct, the guard
does not cover that path, which never calls smc_conn_free() and
releases the clcsock of a never-accepted SMC_CLOSED child under the
parent's lock only. That is a distinct pre-existing site and I would
prefer to handle it in a follow-up patch rather than widen this one;
the commit message already scopes the guarantee to
smc_clcsock_release().
On the Medium issue (tx reachability): the fd lifetime argument is a
fair point and I cannot rule out that the cork path is unreachable in
practice. The guard is cheap defense-in-depth against the same class of
dereference (and the NULL case), so I have kept it, but the commit
message no longer claims more than that, per Mahanta's review. If the
maintainers prefer it dropped I can respin without it.
pw-bot: cr
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
2026-12-05 3:05 ` netdev-bot+sashiko
2026-12-06 15:17 ` Qican Ma [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=179657023158.87613.10037394445377927017@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-bot+sashiko@kernel.org \
--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