net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms
authorVictor Nogueira <victor@mojatatu.com>
Thu, 13 Jul 2023 18:05:10 +0000 (15:05 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:50:41 +0000 (08:50 +0200)
commitfa753f8656777c5caaed54d5c4c71e1ef8a17641
treedbf8f1575102d829c31408c1edbe32c72d64d328
parent813572a08d497e45cfb3e2a730e58acc1f0994b5
net: sched: cls_matchall: Undo tcf_bind_filter in case of failure after mall_set_parms

[ Upstream commit b3d0e0489430735e2e7626aa37e6462cdd136e9d ]

In case an error occurred after mall_set_parms executed successfully, we
must undo the tcf_bind_filter call it issues.

Fix that by calling tcf_unbind_filter in err_replace_hw_filter label.

Fixes: ec2507d2a306 ("net/sched: cls_matchall: Fix error path")
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sched/cls_matchall.c