mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Karsten Graul <kgraul@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
	davem@davemloft.net, kuba@kernel.org, dust.li@linux.alibaba.com
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net/smc: Send out the remaining data in sndbuf before close
Date: Mon, 28 Mar 2022 12:02:14 +0200	[thread overview]
Message-ID: <81aba614-6f6a-1601-6ed9-a2939696a460@linux.ibm.com> (raw)
In-Reply-To: <1648447836-111521-1-git-send-email-guwen@linux.alibaba.com>

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@linux.alibaba.com>
> Fixes: 6b88af839d20 ("net/smc: don't send in the BH context if sock_owned_by_user")
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---

Thank you,

Acked-by: Karsten Graul <kgraul@linux.ibm.com>

  parent reply	other threads:[~2022-03-28 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28  6:10 Wen Gu
2022-03-28  9:04 ` dust.li
2022-03-28  9:55   ` Wen Gu
2022-03-28 10:02 ` Karsten Graul [this message]
2022-03-28 23:30 ` patchwork-bot+netdevbpf

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=81aba614-6f6a-1601-6ed9-a2939696a460@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 \
    /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

all inboxes | Powered by JetHome®