[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 10 Oct 2023 18:45:48 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: netdev@...r.kernel.org, Ayush Sawal <ayush.sawal@...lsio.com>, "David S.
Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, David
Ahern <dsahern@...nel.org>, mptcp@...ts.linux.dev, Boris Pismenny
<borisp@...dia.com>, Tom Deseyn <tdeseyn@...hat.com>
Subject: Re: [PATCH net] tcp: allow again tcp_disconnect() when threads are
waiting
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
Powered by blists - more mailing lists