Re: [PATCH net 2/2] net: fix socket refcounting in skb_complete_tx_timestamp()

2017-03-03 Thread Soheil Hassas Yeganeh
On Fri, Mar 3, 2017 at 7:01 PM, Eric Dumazet wrote: > > TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt > By the time TX completion happens, sk_refcnt might be already 0. > > sock_hold()/sock_put() would then corrupt critical state, like > sk_wmem_alloc and lead to leaks or use a

[PATCH net 2/2] net: fix socket refcounting in skb_complete_tx_timestamp()

2017-03-03 Thread Eric Dumazet
TX skbs do not necessarily hold a reference on skb->sk->sk_refcnt By the time TX completion happens, sk_refcnt might be already 0. sock_hold()/sock_put() would then corrupt critical state, like sk_wmem_alloc and lead to leaks or use after free. Fixes: 62bccb8cdb69 ("net-timestamp: Make the clone