From 22db014997c68928711e5b9e948ac3986ec1ed58 Mon Sep 17 00:00:00 2001 From: Yu Wenjun Date: Thu, 19 Aug 2021 20:10:02 +0800 Subject: [PATCH] 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 --- 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.39.5