[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKD1Yr26iC-7DEtNHP4Rgig0uCNq9Rk6t4ASBX3D0tB=75SZ+w@mail.gmail.com>
Date: Wed, 24 Aug 2016 02:24:39 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: David Ahern <dsa@...ulusnetworks.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH v3 net-next] net: diag: support SOCK_DESTROY for UDP sockets
On Wed, Aug 24, 2016 at 2:16 AM, David Ahern <dsa@...ulusnetworks.com> wrote:
>> So you'd remove the sock_put and sock_gen_put calls from tcp_abort and
>> just add one sock_gen_put in tcp_diag_destroy? That does seem simpler.
>
> untested and mangled on a copy and paste but the intent is:
...
> if (IS_ERR(sk))
> return PTR_ERR(sk);
>
> - return sock_diag_destroy(sk, ECONNABORTED);
> + err = sock_diag_destroy(sk, ECONNABORTED);
> +
> + sock_gen_put(sk); <---- if (!sk_fullsock(sk)) needed here? seems like this works for all TCP
That does seem nicer. I think sock_gen_put will work on all types of
TCP sockets, so sk_fullsock is not needed here.
Eric, any thoughts?
Powered by blists - more mailing lists