On Wed, Aug 24, 2016 at 2:16 AM, David Ahern <d...@cumulusnetworks.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?