[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1389626314.31367.217.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 13 Jan 2014 07:18:34 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: Bob Falken <NetFestivalHaveFun@....com>,
Julian Anastasov <ja@....bg>, netdev@...r.kernel.org,
kaber@...sh.net, tgraf@...g.ch
Subject: Re: [PATCH net] net: avoid reference counter overflows on fib_rules
in multicast forwarding
On Mon, 2014-01-13 at 02:45 +0100, Hannes Frederic Sowa wrote:
> Bob Falken reported that after 4G packets, multicast forwarding stopped
> working. This was because of a rule reference counter overflow which
> freed the rule as soon as the overflow happend.
>
> This patch solves this by adding the FIB_LOOKUP_NOREF flag to
> fib_rules_lookup calls. This is safe even from non-rcu locked sections
> as in this case the flag only implies not taking a reference to the rule,
> which we don't need at all.
We need to not forget this when/if we remove FIB_LOOKUP_NOREF flag,
as all callers use it : We'll have to keep rcu_read_lock() in
fib_rules_lookup()
>
> Rules only hold references to the namespace, which are guaranteed to be
> available during the call of the non-rcu protected function reg_vif_xmit
> because of the interface reference which itself holds a reference to
> the net namespace.
>
> Fixes: f0ad0860d01e47 ("ipv4: ipmr: support multiple tables")
> Fixes: d1db275dd3f6e4 ("ipv6: ip6mr: support multiple tables")
> Reported-by: Bob Falken <NetFestivalHaveFun@....com>
> Cc: Patrick McHardy <kaber@...sh.net>
> Cc: Thomas Graf <tgraf@...g.ch>
> Cc: Julian Anastasov <ja@....bg>
> Cc: Eric Dumazet <eric.dumazet@...il.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
> ---
> Bob Falken already tested this patch, as it is similar to my first
> attempt but the additional and similar fix for ipv6.
>
> We need an additional fix for kernels without FIB_LOOKUP_NOREF, but I'll
> move that to tomorrow, as it is already late here.
Acked-by: Eric Dumazet <edumazet@...gle.com>
Thanks !
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists