From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, Ayush Sawal <ayush.sawal@chelsio.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
David Ahern <dsahern@kernel.org>,
mptcp@lists.linux.dev, Boris Pismenny <borisp@nvidia.com>,
Tom Deseyn <tdeseyn@redhat.com>
Subject: Re: [PATCH net] tcp: allow again tcp_disconnect() when threads are waiting
Date: Tue, 10 Oct 2023 18:45:48 +0200 [thread overview]
Message-ID: <cdb77e7ecec83398ff7d92f7aeb20e0158146a28.camel@redhat.com> (raw)
In-Reply-To: <CANn89iKOZ89xhAsgXyygENOfRzXPhbFn4_PNdA3LUL0a5EYktA@mail.gmail.com>
Hi,
Thank you for your review!
On Tue, 2023-10-10 at 18:21 +0200, Eric Dumazet wrote:
[...]
> > @@ -1585,7 +1596,11 @@ static int peekmsg(struct sock *sk, struct msghdr *msg,
> > release_sock(sk);
> > lock_sock(sk);
> > } else {
> > - sk_wait_data(sk, &timeo, NULL);
> > + ret = sk_wait_data(sk, &timeo, NULL);
> > + if (ret < 0) {
> > + copied = ret;
>
> if (!copied)
> copied = ret;
I think we can infer 'copied' is zero here, as a few lines before we
have:
if (copied)
break;
>
> > @@ -3092,6 +3092,7 @@ int tcp_disconnect(struct sock *sk, int flags)
> > sk->sk_frag.offset = 0;
> > }
> > sk_error_report(sk);
> > + sk->sk_disconnects++;
>
> Should we perform this generically, from the caller ?
Ok, I'll do that in v2.
Thanks!
Paolo
next prev parent reply other threads:[~2023-10-10 16:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 14:37 [PATCH net] tcp: allow again tcp_disconnect() when threads are waiting Paolo Abeni
2023-10-10 15:50 ` Mat Martineau
2023-10-10 16:21 ` Eric Dumazet
2023-10-10 16:45 ` Paolo Abeni [this message]
2023-10-10 17:40 ` Paolo Abeni
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=cdb77e7ecec83398ff7d92f7aeb20e0158146a28.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=ayush.sawal@chelsio.com \
--cc=borisp@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=tdeseyn@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).