netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/9] myri10ge: ensure tx queues remain stopped
@ 2011-06-27 15:05 Jon Mason
  2011-06-27 15:05 ` [PATCH 2/9] myri10ge: Mask PCI Surprise Link Down Events Jon Mason
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Jon Mason @ 2011-06-27 15:05 UTC (permalink / raw)
  To: davem; +Cc: netdev, Andrew Gallatin

Ensure that our tx queues remain stopped when we stop them in
myri10ge_close().  Not doing so can potentially lead to traffic being
transmitted when the interface is removed, which can lead to NULL
pointer dereferences.

Signed-off-by: Jon Mason <mason@myri.com>
---
 drivers/net/myri10ge/myri10ge.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 3ed5f35..a8ae641 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -1461,7 +1461,8 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
 
 	/* start the queue if we've stopped it */
 	if (netif_tx_queue_stopped(dev_queue) &&
-	    tx->req - tx->done < (tx->mask >> 1)) {
+	    tx->req - tx->done < (tx->mask >> 1) &&
+	    ss->mgp->running == MYRI10GE_ETH_RUNNING) {
 		tx->wake_queue++;
 		netif_tx_wake_queue(dev_queue);
 	}
-- 
1.7.5.4


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

end of thread, other threads:[~2011-06-29 13:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-27 15:05 [PATCH 1/9] myri10ge: ensure tx queues remain stopped Jon Mason
2011-06-27 15:05 ` [PATCH 2/9] myri10ge: Mask PCI Surprise Link Down Events Jon Mason
2011-06-29 13:02   ` David Miller
2011-06-27 15:05 ` [PATCH 3/9] myri10ge: rework parity error check and cleanup Jon Mason
2011-06-27 15:27   ` Ben Hutchings
2011-06-27 20:26     ` Jon Mason
2011-06-27 16:01   ` Joe Perches
2011-06-27 20:54   ` [PATCH 3/9 v2] " Jon Mason
2011-06-28  2:17     ` Joe Perches
2011-06-28  3:31       ` Jon Mason
2011-06-28  3:57   ` [PATCH 3/9 v3] " Jon Mason
2011-06-29 13:02     ` David Miller
2011-06-27 15:05 ` [PATCH 4/9] myri10ge: allow small_bytes = 0 Jon Mason
2011-06-29 13:03   ` David Miller
2011-06-27 15:05 ` [PATCH 5/9] myri10ge: add support for set_phys_id Jon Mason
2011-06-29 13:03   ` David Miller
2011-06-27 15:05 ` [PATCH 6/9] myri10ge: remove unnecessary read of PCI_CAP_ID_EXP Jon Mason
2011-06-29 13:03   ` David Miller
2011-06-27 15:05 ` [PATCH 7/9] myri10ge: misc style cleanups Jon Mason
2011-06-27 16:05   ` Joe Perches
2011-06-27 20:56   ` [PATCH 7/9 v2] " Jon Mason
2011-06-29 13:03     ` David Miller
2011-06-27 15:05 ` [PATCH 8/9] myri10ge: update version Jon Mason
2011-06-29 13:04   ` David Miller
2011-06-27 15:05 ` [PATCH 9/9] myri10ge: Update MAINTAINERS Jon Mason
2011-06-29 13:04   ` David Miller
2011-06-29 13:02 ` [PATCH 1/9] myri10ge: ensure tx queues remain stopped David Miller

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).