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

From: Ido Schimmel
Date: Sun Aug 14 2016 - 11:50:01 EST


On Sun, Aug 14, 2016 at 03:38:29PM +0200, Vincent Stehlé wrote:
> 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>

Acked-by: Ido Schimmel <idosch@xxxxxxxxxxxx>

Thank you.