Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-07 Thread Lorenzo Colitti
On Fri, Jul 6, 2018 at 7:24 PM Eric Dumazet wrote: > > Your patch makes sense to me, please submit it formally with : > > Fixes: d7226c7a4dd1 ("net: diag: Fix refcnt leak in error path destroying > socket") > Cc: David Ahern Submitted a patch against net: https://patchwork.ozlabs.org/patch/9407

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-06 Thread Subash Abhinov Kasiviswanathan
Looks like for a TCP_NEW_SYN_RECV socket, sock_diag_destroy essentially ends up doing: struct request_sock *req = inet_reqsk(sk); local_bh_disable(); inet_csk_reqsk_queue_drop_and_put(req->rsk_listener,

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-06 Thread Eric Dumazet
On 07/05/2018 09:46 PM, Lorenzo Colitti wrote: > On Fri, Jul 6, 2018 at 11:37 AM Subash Abhinov Kasiviswanathan > wrote: >> >> From the call stack, a TCP socket is being destroyed using netlink_diag. >> The memory dump showed that the socket was an inet request socket (in >> state TCP_NEW_SYN_

Re: Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-05 Thread Lorenzo Colitti
On Fri, Jul 6, 2018 at 11:37 AM Subash Abhinov Kasiviswanathan wrote: > > From the call stack, a TCP socket is being destroyed using netlink_diag. > The memory dump showed that the socket was an inet request socket (in > state TCP_NEW_SYN_RECV) with refcount of 0. > [...] > 13232.479820: <2>

Crash due to destroying TCP request sockets using SOCK_DESTROY

2018-07-05 Thread Subash Abhinov Kasiviswanathan
We are seeing a crash on an ARM64 device with Android 4.14 based kernel. From the call stack, a TCP socket is being destroyed using netlink_diag. The memory dump showed that the socket was an inet request socket (in state TCP_NEW_SYN_RECV) with refcount of 0. The crash seems to have happened dur