From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E95DDC388F9 for ; Tue, 27 Oct 2020 15:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B01B322263 for ; Tue, 27 Oct 2020 15:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812811; bh=6fmavvFGRS7qOovt/b5GQG9Ett4XYIxHre/1/B5mpxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=T0Hh88C7I216+AH212q2eX7GCcaDjMtY06LboQs9RqjozFQfBTZHZIIEUBWo1UjRT bcVUzuT97o1C0FZ3/zvtE1j0Ws1lvKv/sKvWN2yT8RP5r7nWuc7XfiPadizKrCe5O4 +fOovVJqfMzJOU09E/dDgOAM9ypD3E9swlx6qH90= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1799812AbgJ0Pda (ORCPT ); Tue, 27 Oct 2020 11:33:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:60096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1796686AbgJ0PTt (ORCPT ); Tue, 27 Oct 2020 11:19:49 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7AF0C20657; Tue, 27 Oct 2020 15:19:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811989; bh=6fmavvFGRS7qOovt/b5GQG9Ett4XYIxHre/1/B5mpxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V70JzdM+/oZWfS9hSDbs0uijRghZpqCdbBcvo0Lt4mpiIQPXN9DTIZ4jW197RZu/F kVKcE/YkVXms/qlNjyPag79BHQY17zvehQqUwi0veKpwT7v4gm6pgcBBW/Debfe6yx FBABGq3zn7cKO989CHtmM/fB3fmslmKKpp1ZeQUU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guillaume Nault , Cong Wang , Jakub Kicinski Subject: [PATCH 5.9 054/757] net/sched: act_gate: Unlock ->tcfa_lock in tc_setup_flow_action() Date: Tue, 27 Oct 2020 14:45:04 +0100 Message-Id: <20201027135453.083130184@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guillaume Nault [ 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 --- 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;