From: Karsten Graul <kgraul@linux.ibm.com>
To: liuyacan@corp.netease.com
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com, ubraun@linux.ibm.com
Subject: Re: [PATCH v2 net] net/smc: postpone sk_refcnt increment in connect()
Date: Mon, 23 May 2022 16:44:57 +0200 [thread overview]
Message-ID: <e0b64b80-90e1-5aed-1ca4-f6d20ebac6b7@linux.ibm.com> (raw)
In-Reply-To: <20220523141905.2791310-1-liuyacan@corp.netease.com>
On 23/05/2022 16:19, liuyacan@corp.netease.com wrote:
>> This is a rather unusual problem that can come up when fallback=true BEFORE smc_connect()
>> is called. But nevertheless, it is a problem.
>>
>> Right now I am not sure if it is okay when we NOT hold a ref to smc->sk during all fallback
>> processing. This change also conflicts with a patch that is already on net-next (3aba1030).
>
> Do you mean put the ref to smc->sk during all fallback processing unconditionally and remove
> the fallback branch sock_put() in __smc_release()?
What I had in mind was to eventually call sock_put() in __smc_release() even if sk->sk_state == SMC_INIT
(currently the extra check in the if() for sk->sk_state != SMC_INIT prevents the sock_put()), but only
when it is sure that we actually reached the sock_hold() in smc_connect() before.
But maybe we find out that the sock_hold() is not needed for fallback sockets, I don't know...
next prev parent reply other threads:[~2022-05-23 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 3:24 [PATCH net] net/smc: postpone sk_refcnt increment in connect() liuyacan
2022-05-23 4:57 ` [PATCH v2 " liuyacan
2022-05-23 9:10 ` patchwork-bot+netdevbpf
2022-05-23 12:45 ` Karsten Graul
2022-05-23 14:19 ` liuyacan
2022-05-23 14:44 ` Karsten Graul [this message]
2022-05-23 15:21 ` liuyacan
2022-05-24 11:43 ` Tony Lu
2022-05-24 12:11 ` liuyacan
2022-05-24 12:05 ` Karsten Graul
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=e0b64b80-90e1-5aed-1ca4-f6d20ebac6b7@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.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 \
/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