From: Guillaume Nault Date: Tue, 20 Oct 2020 15:34:31 +0000 (+0200) Subject: net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() X-Git-Tag: v5.8.17~579 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=618a54d780a5a00ca21299545d1dcd7c17cf75f1;p=thirdparty%2Fkernel%2Fstable.git net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() [ 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 Acked-by: Cong Wang Link: https://lore.kernel.org/r/12f60e385584c52c22863701c0185e40ab08a7a7.1603207948.git.gnault@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 4619cb3cb0a8f..8bf6bde1cfe59 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3707,7 +3707,7 @@ int tc_setup_flow_action(struct flow_action *flow_action, 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;