[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160218.113651.1088682629104635773.davem@davemloft.net>
Date: Thu, 18 Feb 2016 11:36:51 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, idryomov@...il.com, eric.dumazet@...il.com
Subject: Re: [PATCH net] tcp/dccp: fix another race at listener dismantle
From: Eric Dumazet <edumazet@...gle.com>
Date: Thu, 18 Feb 2016 05:39:18 -0800
> Ilya reported following lockdep splat:
...
> To properly fix this issue, inet_csk_reqsk_queue_add() needs
> to return to its callers if the child as been queued
> into accept queue.
>
> We also need to make sure listener is still there before
> calling sk->sk_data_ready(), by holding a reference on it,
> since the reference carried by the child can disappear as
> soon as the child is put on accept queue.
>
> Reported-by: Ilya Dryomov <idryomov@...il.com>
> Fixes: ebb516af60e1 ("tcp/dccp: fix race at listener dismantle phase")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Applied and queued up for -stable.
Although if I were writing this myself I would probably make
inet_csk_reqsk_queue_add() return bool since the pointer isn't
used in any way other than as a NULL vs. non-NULL test.
Powered by blists - more mailing lists