From: Ido Schimmel <ido...@idosch.org>
Date: Mon, 25 May 2020 00:38:56 +0300

> From: Ido Schimmel <ido...@mellanox.com>
> 
> vxlan_fdb_info() is not always called with RTNL held or from an RCU
> read-side critical section. For example, in the following call path:
> 
> vxlan_cleanup()
>   vxlan_fdb_destroy()
>     vxlan_fdb_notify()
>       __vxlan_fdb_notify()
>         vxlan_fdb_info()
> 
> The use of rtnl_dereference() can therefore result in the following
> splat [1].
> 
> Fix this by dereferencing the nexthop under RCU read-side critical
> section.
> 
> [1]
> [May24 22:56] =============================
> [  +0.004676] WARNING: suspicious RCU usage
> [  +0.004614] 5.7.0-rc5-custom-16219-g201392003491 #2772 Not tainted
> [  +0.007116] -----------------------------
> [  +0.004657] drivers/net/vxlan.c:276 suspicious rcu_dereference_check() 
> usage!
 ...
> Fixes: 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries")
> Signed-off-by: Ido Schimmel <ido...@mellanox.com>
> Reported-by: Amit Cohen <am...@mellanox.com>

Applied, thanks Ido.

Reply via email to