From: Tony Lu <tonylu@linux.alibaba.com>
To: liuyacan@corp.netease.com
Cc: davem@davemloft.net, edumazet@google.com, kgraul@linux.ibm.com,
kuba@kernel.org, linux-kernel@vger.kernel.org,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com, wenjia@linux.ibm.com, hwippel@linux.ibm.com,
ubraun@linux.ibm.com
Subject: Re: [PATCH net v2] net/smc: Remove redundant refcount increase
Date: Thu, 1 Sep 2022 14:49:59 +0800 [thread overview]
Message-ID: <YxBWF7QCN+TnLk+4@TonyMac-Alibaba> (raw)
In-Reply-To: <20220830152314.838736-1-liuyacan@corp.netease.com>
On Tue, Aug 30, 2022 at 11:23:14PM +0800, liuyacan@corp.netease.com wrote:
> From: Yacan Liu <liuyacan@corp.netease.com>
>
> For passive connections, the refcount increment has been done in
> smc_clcsock_accept()-->smc_sock_alloc().
>
> Fixes: 3b2dec2603d5 ("net/smc: restructure client and server code in af_smc")
> Signed-off-by: Yacan Liu <liuyacan@corp.netease.com>
>
> ---
> Change in v2:
> -- Tune commit message
> ---
> net/smc/af_smc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
> index 79c1318af..0939cc3b9 100644
> --- a/net/smc/af_smc.c
> +++ b/net/smc/af_smc.c
> @@ -1855,7 +1855,6 @@ static void smc_listen_out_connected(struct smc_sock *new_smc)
> {
> struct sock *newsmcsk = &new_smc->sk;
>
> - sk_refcnt_debug_inc(newsmcsk);
> if (newsmcsk->sk_state == SMC_INIT)
> newsmcsk->sk_state = SMC_ACTIVE;
>
Thanks for this fixes. I dig into this sk_refcnt_debug_* facility. It
seems this is a very old debug methods and doesn't help a lot for sock
leak issue. Maybe there is another method to help track this issue?
For this patch, It looks good for me and tested in our environment.
Reviewed-by: Tony Lu <tonylu@linux.alibaba.com>
Cheers,
Tony Lu
next prev parent reply other threads:[~2022-09-01 6:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 14:53 [PATCH net] net/smc: Remove redundant refcount increase liuyacan
2022-08-29 16:00 ` Tony Lu
2022-08-30 15:23 ` [PATCH net v2] " liuyacan
2022-09-01 6:49 ` Tony Lu [this message]
2022-09-01 8:20 ` patchwork-bot+netdevbpf
2022-09-01 5:42 ` [PATCH net] " Wenjia Zhang
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=YxBWF7QCN+TnLk+4@TonyMac-Alibaba \
--to=tonylu@linux.alibaba.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hwippel@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=liuyacan@corp.netease.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ubraun@linux.ibm.com \
--cc=wenjia@linux.ibm.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