[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170822.110334.1274898045765726227.davem@davemloft.net>
Date: Tue, 22 Aug 2017 11:03:34 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: weiwan@...gle.com
Cc: netdev@...r.kernel.org, edumazet@...gle.com, kafai@...com
Subject: Re: [PATCH net v3] ipv6: add rcu grace period before freeing
fib6_node
From: Wei Wang <weiwan@...gle.com>
Date: Mon, 21 Aug 2017 09:47:10 -0700
> From: Wei Wang <weiwan@...gle.com>
>
> We currently keep rt->rt6i_node pointing to the fib6_node for the route.
> And some functions make use of this pointer to dereference the fib6_node
> from rt structure, e.g. rt6_check(). However, as there is neither
> refcount nor rcu taken when dereferencing rt->rt6i_node, it could
> potentially cause crashes as rt->rt6i_node could be set to NULL by other
> CPUs when doing a route deletion.
> This patch introduces an rcu grace period before freeing fib6_node and
> makes sure the functions that dereference it takes rcu_read_lock().
>
> Note: there is no "Fixes" tag because this bug was there in a very
> early stage.
>
> Signed-off-by: Wei Wang <weiwan@...gle.com>
> Acked-by: Eric Dumazet <edumazet@...gle.com>
> Acked-by: Martin KaFai Lau <kafai@...com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists