[dpdk-dev] net/mlx5: fix rollback when starting device

Message ID 20170510173016.7989-1-yskoh@mellanox.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yongseok Koh May 10, 2017, 5:30 p.m. UTC
  In mlx5_dev_start(), the spinlock isn't released when returning error.

Fixes: c8d4ee50cc85 ("net/mlx5: fix startup when flow cannot be applied")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Adrien Mazarguil May 10, 2017, 7:29 p.m. UTC | #1
On Wed, May 10, 2017 at 10:30:16AM -0700, Yongseok Koh wrote:
> In mlx5_dev_start(), the spinlock isn't released when returning error.
> 
> Fixes: c8d4ee50cc85 ("net/mlx5: fix startup when flow cannot be applied")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  
Thomas Monjalon May 10, 2017, 7:42 p.m. UTC | #2
10/05/2017 21:29, Adrien Mazarguil:
> On Wed, May 10, 2017 at 10:30:16AM -0700, Yongseok Koh wrote:
> > In mlx5_dev_start(), the spinlock isn't released when returning error.
> > 
> > Fixes: c8d4ee50cc85 ("net/mlx5: fix startup when flow cannot be applied")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

Applied, thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 229b05e79..8c5aa6910 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -109,6 +109,7 @@  mlx5_dev_start(struct rte_eth_dev *dev)
 	priv_mac_addrs_disable(priv);
 	priv_destroy_hash_rxqs(priv);
 	priv_flow_stop(priv);
+	priv_unlock(priv);
 	return -err;
 }