]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: sched: cls_bpf: Undo tcf_bind_filter in case of an error
authorVictor Nogueira <victor@mojatatu.com>
Thu, 13 Jul 2023 18:05:13 +0000 (15:05 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 06:47:00 +0000 (08:47 +0200)
commit52ed161463491b5bbe007d7846f8d71aed86d80b
treecc444c7163786f01b49754eee0c7b60bf56050af
parent5ed16ecae5bfb367b731c2205684742570e6f806
net: sched: cls_bpf: Undo tcf_bind_filter in case of an error

[ Upstream commit 26a22194927e8521e304ed75c2f38d8068d55fc7 ]

If cls_bpf_offload errors out, we must also undo tcf_bind_filter that
was done before the error.

Fix that by calling tcf_unbind_filter in errout_parms.

Fixes: eadb41489fd2 ("net: cls_bpf: add support for marking filters as hardware-only")
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_bpf.c