• Eric Dumazet's avatar
    sit: fix sit0 percpu double allocations · 4ece9009
    Eric Dumazet authored
    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()
    
    Note that ipip6_tunnel_clone_6rd() also needs to be called
    after register_netdev() (calling ipip6_tunnel_init())
    
    Fixes: ebe084aa ("sit: Use ipip6_tunnel_init as the ndo_init function.")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Cc: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4ece9009
sit.c 43.6 KB