Re: [PATCH net] net/smc: Send out the remaining data in sndbuf before close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/03/2022 08:10, Wen Gu wrote:
> The current autocork algorithms will delay the data transmission
> in BH context to smc_release_cb() when sock_lock is hold by user.
> 
> So there is a possibility that when connection is being actively
> closed (sock_lock is hold by user now), some corked data still
> remains in sndbuf, waiting to be sent by smc_release_cb(). This
> will cause:
> 
> - smc_close_stream_wait(), which is called under the sock_lock,
>   has a high probability of timeout because data transmission is
>   delayed until sock_lock is released.
> 
> - Unexpected data sends may happen after connction closed and use
>   the rtoken which has been deleted by remote peer through
>   LLC_DELETE_RKEY messages.
> 
> So this patch will try to send out the remaining corked data in
> sndbuf before active close process, to ensure data integrity and
> avoid unexpected data transmission after close.
> 
> Reported-by: Guangguan Wang <guangguan.wang@xxxxxxxxxxxxxxxxx>
> Fixes: 6b88af839d20 ("net/smc: don't send in the BH context if sock_owned_by_user")
> Signed-off-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx>
> ---

Thank you,

Acked-by: Karsten Graul <kgraul@xxxxxxxxxxxxx>



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux