lkml.org 
[lkml]   [2015]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double allocations
From
Date
On Wed, 2015-12-09 at 09:36 +0000, Luis Henriques wrote:
> 3.16.7-ckt21 -stable review patch.  If anyone has any objections,
> please let me know.
>
> ------------------
>
> From: Eric Dumazet <edumazet@google.com>
>
> commit 4ece9009774596ee3df0acba65a324b7ea79387c upstream.
>
> sit0 device allocates its percpu storage twice :
> - One time in ipip6_tunnel_init()
> - One time in ipip6_fb_tunnel_init()
>
> Thus we leak 48 bytes per possible cpu per network namespace
> dismantle.
>
> ipip6_fb_tunnel_init() can be much simpler and does not
> return an error, and should be called after register_netdev()
[...]

Doesn't this introduce a race condition when sit is a module?  There
seems to be nothing to prevent access to the partially initialised
device after calling register_netdev(), if sit_init_net() is called
during module loading rather than during namespace creation.

Ben.

--
Ben Hutchings
Knowledge is power. France is bacon.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-12-12 05:41    [W:0.452 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site