From: Yu Wenjun Date: Thu, 19 Aug 2021 12:10:02 +0000 (+0800) Subject: net/ice: fix deadlock on flow query X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=22db014997c68928711e5b9e948ac3986ec1ed58;p=dpdk.git net/ice: fix deadlock on flow query Default case of the switch statement causes deadlock because it returns without unlocking the 'flow_ops_lock' lock. Fixing it. Fixes: 0d6ef740e411 ("net/ice: support flow ops thread safe") Cc: stable@dpdk.org Signed-off-by: Yu Wenjun Acked-by: Qi Zhang --- 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; }