]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Fix rif counter freeing routine
authorArkadi Sharshevsky <arkadis@mellanox.com>
Thu, 18 May 2017 07:18:53 +0000 (09:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 15:04:00 +0000 (11:04 -0400)
commit0a579f78805de9feb7c94c640f5f4b9c67ce179a
tree4edd249eae86175b3b3075f6c4e133fe56b0f028
parent3e6565a784caefd7dda0b39f2569934be18a2c6e
mlxsw: spectrum_router: Fix rif counter freeing routine

During rif counter freeing the counter index can be invalid. Add check
of validity before freeing the counter.

Fixes: 12cbf82736b6 ("mlxsw: spectrum: Support for counters on router interfaces")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c