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: <d83109fe-ae25-def0-b28e-f8695d4535c7@linux.ibm.com>
Date:   Tue, 23 Nov 2021 10:26:21 +0100
From:   Karsten Graul <kgraul@...ux.ibm.com>
To:     Tony Lu <tonylu@...ux.alibaba.com>
Cc:     kuba@...nel.org, davem@...emloft.net, guwen@...ux.alibaba.com,
        netdev@...r.kernel.org, linux-s390@...r.kernel.org,
        linux-rdma@...r.kernel.org
Subject: Re: [PATCH RFC net] net/smc: Ensure the active closing peer first
 closes clcsock

On 16/11/2021 04:30, Tony Lu wrote:
> diff --git a/net/smc/smc_close.c b/net/smc/smc_close.c
> index 0f9ffba07d26..04620b53b74a 100644
> --- a/net/smc/smc_close.c
> +++ b/net/smc/smc_close.c
> @@ -228,6 +228,12 @@ int smc_close_active(struct smc_sock *smc)
>  			/* send close request */
>  			rc = smc_close_final(conn);
>  			sk->sk_state = SMC_PEERCLOSEWAIT1;
> +
> +			/* actively shutdown clcsock before peer close it,
> +			 * prevent peer from entering TIME_WAIT state.
> +			 */
> +			if (smc->clcsock && smc->clcsock->sk)
> +				rc = kernel_sock_shutdown(smc->clcsock, SHUT_RDWR);
>  		} else {

While integrating this patch I stumbled over the overwritten rc, which was
already set with the return value from smc_close_final().
Is the rc from kernel_sock_shutdown() even important for the result of this 
function? How to handle this in your opinion?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ