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] [thread-next>] [day] [month] [year] [list]
Message-ID: <23b607fe-95da-ea8a-8dda-900a51572b90@linux.alibaba.com>
Date:   Wed, 5 Jan 2022 16:55:51 +0800
From:   Wen Gu <guwen@...ux.alibaba.com>
To:     dust.li@...ux.alibaba.com, 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
Subject: Re: [PATCH net v3] net/smc: Reset conn->lgr when link group
 registration fails

Thanks for your suggestion.

On 2022/1/5 3:54 pm, dust.li wrote:

>> -		if (rc)
>> +		if (rc) {
>> +			spin_lock_bh(lgr_lock);
>> +			if (!list_empty(&lgr->list))
>> +				list_del_init(&lgr->list);
>> +			spin_unlock_bh(lgr_lock);
>> +			__smc_lgr_terminate(lgr, true);
> 
> What about adding a smc_lgr_terminate() wrapper and put list_del_init()
> and __smc_lgr_terminate() into it ?

Adding a new wrapper is a good idea. But I think the logic here is relatively simple.
So instead of wrapping them, I coded them like what smc_lgr_cleanup_early() does.

Thanks,
Wen Gu

> 
>> 			goto out;
>> +		}
>> 	}
>> 	conn->local_tx_ctrl.common.type = SMC_CDC_MSG_TYPE;
>> 	conn->local_tx_ctrl.len = SMC_WR_TX_SIZE;
>> -- 
>> 1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ