lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 4 Jan 2022 10:13:27 +0800
From:   Wen Gu <guwen@...ux.alibaba.com>
To:     Karsten Graul <kgraul@...ux.ibm.com>, davem@...emloft.net,
        kuba@...nel.org
Cc:     linux-s390@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Dust Li <dust.li@...ux.alibaba.com>,
        tonylu_linux <tonylu@...ux.alibaba.com>
Subject: Re: [RFC PATCH net] net/smc: Reset conn->lgr when link group
 registration fails

Thanks for your reply.

On 2022/1/3 6:52 pm, Karsten Graul wrote:
> On 30/12/2021 04:50, Wen Gu wrote:
>> Thanks for your reply.
>>
>> On 2021/12/29 9:07 pm, Karsten Graul wrote:
>>> On 28/12/2021 08:49, Wen Gu wrote:
>>>> SMC connections might fail to be registered to a link group due to
>>>> things like unable to find a link to assign to in its creation. As
>>>> a result, connection creation will return a failure and most
>>>> resources related to the connection won't be applied or initialized,
>>>> such as conn->abort_work or conn->lnk.
>>> What I do not understand is the extra step after the new label out_unreg: that
>>> may invoke smc_lgr_schedule_free_work(). You did not talk about that one.
>>> Is the idea to have a new link group get freed() when a connection could not
>>> be registered on it?
>> Maybe we should try to free the link group when the registration fails, no matter
>> it is new created or already existing? If so, is it better to do it in the same
>> place like label 'out_unreg'?
> 
> I agree with your idea.
> 
> With the proposed change that conn->lgr gets not even set when the registration fails
> we would not need the "conn->lgr = NULL;" after label out_unreg?

Yes, conn->lgr now will be reset in smc_lgr_register_conn() if registration fails.

> 
> And as far as I understand the invocation of smc_lgr_schedule_free_work(lgr) is only
> needed after label "create", because when an existing link group was found and the registration
> failed then its free work would already be started when no more connections are assigned
> to the link group, right?

Thanks for your explanation. I also agree with only invoking smc_lgr_schedule_free_work(lgr)
after label "create" now. I will improve it and send a v2 patch.

Thanks,
Wen Gu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ