From: Guillaume Nault <[email protected]>

[ Upstream commit b130762161374b1ef31549bef8ebd4abeb998d94 ]

We need to jump to the "err_out_locked" label when
tcf_gate_get_entries() fails. Otherwise, tc_setup_flow_action() exits
with ->tcfa_lock still held.

Fixes: d29bdd69ecdd ("net: schedule: add action gate offloading")
Signed-off-by: Guillaume Nault <[email protected]>
Acked-by: Cong Wang <[email protected]>
Link: 
https://lore.kernel.org/r/12f60e385584c52c22863701c0185e40ab08a7a7.1603207948.git.gna...@redhat.com
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 net/sched/cls_api.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3712,7 +3712,7 @@ int tc_setup_flow_action(struct flow_act
                        entry->gate.num_entries = tcf_gate_num_entries(act);
                        err = tcf_gate_get_entries(entry, act);
                        if (err)
-                               goto err_out;
+                               goto err_out_locked;
                } else {
                        err = -EOPNOTSUPP;
                        goto err_out_locked;


Reply via email to