Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-09 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 03:47:25PM -0800, Eric Dumazet wrote: > > On 03/08/2019 02:40 PM, Guillaume Nault wrote: > > On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: > > > > Long term, do we want to keep the WARN_ON_ONCE()? If so, we should > > probably remove the comment. > > We wa

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread David Miller
From: Eric Dumazet Date: Fri, 8 Mar 2019 15:47:25 -0800 > Signed-off-by: Eric Dumazet Applied and queued up for -stable.

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 02:40 PM, Guillaume Nault wrote: > On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: >> >> >> On 03/08/2019 02:22 PM, Guillaume Nault wrote: >>> On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: On 03/08/2019 01:09 PM, Guillaume Nault wrote: >

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 02:34:07PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 02:22 PM, Guillaume Nault wrote: > > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > >> > >> > >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: > >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 02:22 PM, Guillaume Nault wrote: > On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: >> >> >> On 03/08/2019 01:09 PM, Guillaume Nault wrote: >>> @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, >>> struct sk_buff *skb, >>> refcount_set

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
On Fri, Mar 08, 2019 at 01:33:02PM -0800, Eric Dumazet wrote: > > > On 03/08/2019 01:09 PM, Guillaume Nault wrote: > > @@ -216,7 +216,12 @@ struct sock *tcp_get_cookie_sock(struct sock *sk, > > struct sk_buff *skb, > > refcount_set(&req->rsk_refcnt, 1); > > tcp_sk(child)-

Re: [PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Eric Dumazet
On 03/08/2019 01:09 PM, Guillaume Nault wrote: > Commit 7716682cc58e ("tcp/dccp: fix another race at listener > dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted > {tcp,dccp}_check_req() accordingly. However, TFO and syncookies > weren't modified, thus leaking allocated resources on

[PATCH net] tcp: handle inet_csk_reqsk_queue_add() failures

2019-03-08 Thread Guillaume Nault
Commit 7716682cc58e ("tcp/dccp: fix another race at listener dismantle") let inet_csk_reqsk_queue_add() fail, and adjusted {tcp,dccp}_check_req() accordingly. However, TFO and syncookies weren't modified, thus leaking allocated resources on error. Contrary to tcp_check_req(), in both syncookies an