From: Karsten Graul <kgraul@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>, davem@davemloft.net, kuba@kernel.org
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, dust.li@linux.alibaba.com,
tonylu@linux.alibaba.com
Subject: Re: [RFC PATCH net v2 1/2] net/smc: Resolve the race between link group access and termination
Date: Fri, 7 Jan 2022 10:54:29 +0100 [thread overview]
Message-ID: <ed37164f-74b1-de58-8308-4a11ea352faa@linux.ibm.com> (raw)
In-Reply-To: <747c3399-4e6f-0353-95bf-6b6f3a0f5f60@linux.alibaba.com>
On 06/01/2022 14:02, Wen Gu wrote:
> Thanks for your reply.
>
> On 2022/1/5 8:03 pm, Karsten Graul wrote:
>> On 05/01/2022 09:27, Wen Gu wrote:
>>> On 2022/1/3 6:36 pm, Karsten Graul wrote:
>>>> On 31/12/2021 10:44, Wen Gu wrote:
>>>>> On 2021/12/29 8:56 pm, Karsten Graul wrote:
>>>>>> On 28/12/2021 16:13, Wen Gu wrote:
>>>>>>> We encountered some crashes caused by the race between the access
>>>>>>> and the termination of link groups.
> So I am trying this way:
>
> 1) Introduce a new helper smc_conn_lgr_state() to check the three stages mentioned above.
>
> enum smc_conn_lgr_state {
> SMC_CONN_LGR_ORPHAN, /* conn was never registered in a link group */
> SMC_CONN_LGR_VALID, /* conn is registered in a link group now */
> SMC_CONN_LGR_INVALID, /* conn was registered in a link group, but now
> is unregistered from it and conn->lgr should
> not be used any more */
> };
>
> 2) replace the current conn->lgr check with the new helper.
>
> These new changes are under testing now.
>
> What do you think about it? :)
Sounds good, but is it really needed to separate 3 cases, i.e. who is really using them 3?
Doesn't it come down to a more simple smc_conn_lgr_valid() which is easier to implement in
the various places in the code? (i.e.: if (smc_conn_lgr_valid()) ....)
Valid would mean conn->lgr != NULL and conn->alert_token_local != 0. The more special cases
would check what they want by there own.
next prev parent reply other threads:[~2022-01-07 9:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 15:13 [RFC PATCH net v2 0/2] net/smc: Fix for race in smc link group termination Wen Gu
2021-12-28 15:13 ` [RFC PATCH net v2 1/2] net/smc: Resolve the race between link group access and termination Wen Gu
2021-12-29 12:56 ` Karsten Graul
2021-12-31 9:44 ` Wen Gu
2022-01-03 10:36 ` Karsten Graul
2022-01-05 8:27 ` Wen Gu
2022-01-05 12:03 ` Karsten Graul
2022-01-06 13:02 ` Wen Gu
2022-01-07 9:54 ` Karsten Graul [this message]
2022-01-07 12:04 ` Wen Gu
2021-12-28 15:13 ` [RFC PATCH net v2 2/2] net/smc: Resolve the race between SMC-R link access and clear Wen Gu
2021-12-29 12:51 ` Karsten Graul
2021-12-30 4:00 ` dust.li
2021-12-31 9:45 ` Wen Gu
2022-01-03 10:39 ` 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=ed37164f-74b1-de58-8308-4a11ea352faa@linux.ibm.com \
--to=kgraul@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=dust.li@linux.alibaba.com \
--cc=guwen@linux.alibaba.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tonylu@linux.alibaba.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;
as well as URLs for NNTP newsgroup(s).