From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B99D9A0C47; Thu, 19 Aug 2021 14:11:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F7F940DFD; Thu, 19 Aug 2021 14:11:03 +0200 (CEST) Received: from m12-18.163.com (m12-18.163.com [220.181.12.18]) by mails.dpdk.org (Postfix) with ESMTP id 715B540141; Thu, 19 Aug 2021 14:11:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=dYuJc QcRInjzrZfqfKRlPEwxkVcGB+7qV3iu0l1qzdE=; b=NV9WAGFIpEMMTfYFcWa0I VG0lKtwLi5Y1FKO9nR8/9kc5i5eJJat+wUlrzragqaKWDIPITOioNTs7XkkD/g9f FHdzJ5eniGp53aYZrUVeaYq1S1DwdHrExHIYv4P7fhciyCnKPMt/YUTAD9iRw30i LJmX/f7sNASV/OMQ3oQKNI= Received: from localhost.localdomain (unknown [223.112.105.136]) by smtp14 (Coremail) with SMTP id EsCowADX3tZBSh5hoA7f0g--.31789S2; Thu, 19 Aug 2021 20:10:58 +0800 (CST) From: Yu Wenjun To: qiming.yang@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, stable@dpdk.org, Yu Wenjun Date: Thu, 19 Aug 2021 20:10:02 +0800 Message-Id: <20210819121002.1433-1-yuwenjun0x@163.com> X-Mailer: git-send-email 2.32.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: EsCowADX3tZBSh5hoA7f0g--.31789S2 X-Coremail-Antispam: 1Uf129KBjvdXoWruF13Gr15WrW8tw43KF1kuFg_yoWfGrb_CF 1xJw1xJF4jqr4rKry5XwsxA34Fk3WxXr97Za17ta4fGr1rt3WrXwnY9r13JrWvkFZruFnr CF1xZr1xAFW0qjkaLaAFLSUrUUUUbb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUjm9atUUUUU== X-Originating-IP: [223.112.105.136] X-CM-SenderInfo: p1xzv0hmxqi5i6rwjhhfrp/1tbisgbz1FUMTRQ0nQABs7 Subject: [dpdk-dev] [PATCH] net/ice: fix deadlock in ice_flow_query() X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" It will cause deadlock when use switch-default, so fix it Signed-off-by: Yu Wenjun --- drivers/net/ice/ice_generic_flow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index 66b5743abf..c2fa75f165 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -2518,15 +2518,16 @@ ice_flow_query(struct rte_eth_dev *dev, ret = flow->engine->query_count(ad, flow, count, error); break; default: - return rte_flow_error_set(error, ENOTSUP, + ret = rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, actions, "action not supported"); + goto out; } } +out: rte_spinlock_unlock(&pf->flow_ops_lock); - return ret; } -- 2.32.0.windows.1