Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664109 > unrolled thread

[PATCH 4.11 006/150] cxgb4: avoid enabling napi twice to the same queue

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-06-12 19:40 +0200
Last post2017-06-12 19:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.11 006/150] cxgb4: avoid enabling napi twice to the same queue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:40 +0200

#1664109 — [PATCH 4.11 006/150] cxgb4: avoid enabling napi twice to the same queue

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-06-12 19:40 +0200
Subject[PATCH 4.11 006/150] cxgb4: avoid enabling napi twice to the same queue
Message-ID<tRBtL-56r-3@gated-at.bofh.it>
4.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ganesh Goudar <ganeshgr@chelsio.com>


[ Upstream commit e7519f9926f1d0d11c776eb0475eb098c7760f68 ]

Take uld mutex to avoid race between cxgb_up() and
cxgb4_register_uld() to enable napi for the same uld
queue.

Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2217,10 +2217,14 @@ static int cxgb_up(struct adapter *adap)
 		if (err)
 			goto irq_err;
 	}
+
+	mutex_lock(&uld_mutex);
 	enable_rx(adap);
 	t4_sge_start(adap);
 	t4_intr_enable(adap);
 	adap->flags |= FULL_INIT_DONE;
+	mutex_unlock(&uld_mutex);
+
 	notify_ulds(adap, CXGB4_STATE_UP);
 #if IS_ENABLED(CONFIG_IPV6)
 	update_clip(adap);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web