[dpdk-stable] [PATCH 17.11] eventdev: fix unlock in Rx adapter
Nikhil Rao
nikhil.rao at intel.com
Thu Jan 17 05:47:11 CET 2019
[ backported from upstream commit e846cfdec34cc58b9a1a2438d313028246b8e986 ]
In the eth Rx adapter SW service function,
move the return to after the spinlock unlock.
Coverity issue: 302857
Fixes: a66a83744667 ("eventdev: fix Rx SW adapter stop")
Cc: stable at dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao at intel.com>
Acked-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
---
lib/librte_eventdev/rte_event_eth_rx_adapter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index d5c3fd5..de4cf73 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -545,8 +545,8 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b)
if (rte_spinlock_trylock(&rx_adapter->rx_lock) == 0)
return 0;
if (!rx_adapter->rxa_started) {
- return 0;
rte_spinlock_unlock(&rx_adapter->rx_lock);
+ return 0;
}
eth_rx_poll(rx_adapter);
rte_spinlock_unlock(&rx_adapter->rx_lock);
--
1.8.3.1
More information about the stable
mailing list