Re: [PATCH] mlxsw: spectrum_router: Fix use after free

From: David Miller
Date: Mon Aug 15 2016 - 00:33:21 EST


From: Vincent Stehlé <vincent.stehle@xxxxxxxxxxx>
Date: Sun, 14 Aug 2016 15:38:29 +0200

> In mlxsw_sp_router_fib4_add_info_destroy(), the fib_entry pointer is used
> after it has been freed by mlxsw_sp_fib_entry_destroy(). Use a temporary
> variable to fix this.
>
> Fixes: 61c503f976b5449e ("mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops")
> Signed-off-by: Vincent Stehlé <vincent.stehle@xxxxxxxxxxx>
> Cc: Jiri Pirko <jiri@xxxxxxxxxxxx>

Applied.