aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2016-08-28 14:16:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-31 05:02:11 -0600
commit2ff77df8f246eea8a13a0940e9788a1dfa88d32c (patch)
treee5b8c16f1d24aaf2924d9acf7799d250437ba17c
parent2b0a6bd8227b96b412a6ed9446c793aca5602927 (diff)
downloadlinux-yocto-4.8-2ff77df8f246eea8a13a0940e9788a1dfa88d32c.tar.gz
linux-yocto-4.8-2ff77df8f246eea8a13a0940e9788a1dfa88d32c.tar.bz2
linux-yocto-4.8-2ff77df8f246eea8a13a0940e9788a1dfa88d32c.zip
IB/mlx5: Fix steering resource leak
commit 7055a29471eebf4b62687944694222635ed44b09 upstream. Fix multicast flow rule leak on adding unicast rule failure. Fixes: 038d2ef87572 ('IB/mlx5: Add flow steering support') Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/infiniband/hw/mlx5/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index e19537cf44ab..bff8707a2f1f 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1843,6 +1843,7 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de
&leftovers_specs[LEFTOVERS_UC].flow_attr,
dst);
if (IS_ERR(handler_ucast)) {
+ mlx5_del_flow_rule(handler->rule);
kfree(handler);
handler = handler_ucast;
} else {