Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1290108

Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double allocations

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double allocations
Date 2015-12-12 05:20 +0100
Message-ID <qEJP4-5G5-9@gated-at.bofh.it> (permalink)
References <qDJo5-6xK-3@gated-at.bofh.it> <qDJo5-6xK-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double allocations Luis Henriques <luis.henriques@canonical.com> - 2015-12-09 10:40 +0100
  Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Ben Hutchings <ben@decadent.org.uk> - 2015-12-12 05:20 +0100
    Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Luis Henriques <luis.henriques@canonical.com> - 2015-12-13 20:00 +0100
      Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Ben Hutchings <ben@decadent.org.uk> - 2015-12-13 21:30 +0100
        Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-13 21:50 +0100
          Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Ben Hutchings <ben@decadent.org.uk> - 2015-12-13 22:30 +0100
            Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-13 22:50 +0100
              Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Ben Hutchings <ben@decadent.org.uk> - 2015-12-13 23:00 +0100
                Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Eric Dumazet <eric.dumazet@gmail.com> - 2015-12-13 23:50 +0100
                Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Ben Hutchings <ben@decadent.org.uk> - 2015-12-14 00:10 +0100
          Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Luis Henriques <luis.henriques@canonical.com> - 2015-12-13 22:40 +0100
          Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations David Miller <davem@davemloft.net> - 2015-12-13 23:20 +0100
            Re: [PATCH 3.16.y-ckt 009/126] sit: fix sit0 percpu double  allocations Luis Henriques <luis.henriques@canonical.com> - 2015-12-13 23:30 +0100

csiph-web