DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter
@ 2018-11-20 22:09 nikhil.rao
  2018-11-21 12:48 ` Jerin Jacob
  0 siblings, 1 reply; 3+ messages in thread
From: nikhil.rao @ 2018-11-20 22:09 UTC (permalink / raw)
  To: dev; +Cc: Nikhil Rao, stable

From: Nikhil Rao <nikhil.rao@intel.com>

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@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.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 71d008cd1..8831bc35f 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -1165,8 +1165,8 @@ rxa_service_func(void *args)
 	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;
 	}
 
 	stats = &rx_adapter->stats;
-- 
2.14.1.145.gb3622a4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter
  2018-11-20 22:09 [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter nikhil.rao
@ 2018-11-21 12:48 ` Jerin Jacob
  2018-11-23  1:04   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Jerin Jacob @ 2018-11-21 12:48 UTC (permalink / raw)
  To: nikhil.rao; +Cc: dev, stable

-----Original Message-----
> Date: Wed, 21 Nov 2018 03:39:15 +0530
> From: nikhil.rao@intel.com
> To: dev@dpdk.org
> CC: Nikhil Rao <nikhil.rao@intel.com>, stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter
> X-Mailer: git-send-email 2.14.1.145.gb3622a4
> 
> 
> From: Nikhil Rao <nikhil.rao@intel.com>
> 
> 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@dpdk.org
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>

Acked-by: Jerin Jacob <jerin.jacob@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 71d008cd1..8831bc35f 100644
> --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
> @@ -1165,8 +1165,8 @@ rxa_service_func(void *args)
>         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;
>         }
> 
>         stats = &rx_adapter->stats;
> --
> 2.14.1.145.gb3622a4
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter
  2018-11-21 12:48 ` Jerin Jacob
@ 2018-11-23  1:04   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-11-23  1:04 UTC (permalink / raw)
  To: nikhil.rao; +Cc: dev, Jerin Jacob, stable

21/11/2018 13:48, Jerin Jacob:
> > From: Nikhil Rao <nikhil.rao@intel.com>
> > 
> > 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@dpdk.org
> > Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> 
> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-23  1:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 22:09 [dpdk-dev] [PATCH] eventdev: fix missing unlock in eth Rx adapter nikhil.rao
2018-11-21 12:48 ` Jerin Jacob
2018-11-23  1:04   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).