[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40334043-6740-3317-4672-c559a4a2b567@gmail.com>
Date: Fri, 13 May 2022 12:40:41 +0300
From: Leonard Crestez <cdleonard@...il.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev <netdev@...r.kernel.org>, Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net] Revert "tcp/dccp: get rid of inet_twsk_purge()"
On 13.05.2022 00:14, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> This reverts commits:
>
> 0dad4087a86a2cbe177404dc73f18ada26a2c390 ("tcp/dccp: get rid of inet_twsk_purge()")
> d507204d3c5cc57d9a8bdf0a477615bb59ea1611 ("tcp/dccp: add tw->tw_bslot")
>
> As Leonard pointed out, a newly allocated netns can happen
> to reuse a freed 'struct net'.
>
> While TCP TW timers were covered by my patches, other things were not:
>
> 1) Lookups in rx path (INET_MATCH() and INET6_MATCH()), as they look
> at 4-tuple plus the 'struct net' pointer.
>
> 2) /proc/net/tcp[6] and inet_diag, same reason.
>
> 3) hashinfo->bhash[], same reason.
>
> Fixing all this seems risky, lets instead revert.
>
> In the future, we might have a per netns tcp hash table, or
> a per netns list of timewait sockets...
>
> Fixes: 0dad4087a86a ("tcp/dccp: get rid of inet_twsk_purge()")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Leonard Crestez <cdleonard@...il.com>
Tested-by: Leonard Crestez <cdleonard@...il.com>
Powered by blists - more mailing lists