[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180723182509.xk7z5abx7q3c5d3n@kafai-mbp.dhcp.thefacebook.com>
Date: Mon, 23 Jul 2018 11:25:09 -0700
From: Martin KaFai Lau <kafai@...com>
To: Wei Wang <weiwan@...gle.com>
CC: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
David Ahern <dsahern@...il.com>
Subject: Re: [PATCH net] ipv6: use fib6_info_hold_safe() when necessary
On Sat, Jul 21, 2018 at 08:56:32PM -0700, Wei Wang wrote:
> From: Wei Wang <weiwan@...gle.com>
>
> In the code path where only rcu read lock is held, e.g. in the route
> lookup code path, it is not safe to directly call fib6_info_hold()
> because the fib6_info may already have been deleted but still exists
> in the rcu grace period. Holding reference to it could cause double
> free and crash the kernel.
>
> This patch adds a new function fib6_info_hold_safe() and replace
> fib6_info_hold() in all necessary places.
Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists