All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, jeff@garzik.org, gospo@redhat.com,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH] ixgbe: Fix a set_num_queues() bug that can result in num_(r|t)x_queues = 0
Date: Sat, 07 Feb 2009 00:33:02 -0800	[thread overview]
Message-ID: <20090207083257.15354.43853.stgit@lost.foo-projects.org> (raw)

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

Now that our set_num_queues() routines for each feature are re-entrant, and
can be called at any point, they shouldn't zero out the feature's indices
or mask bits.  Subsequent calls into those routines for those features can
result in zero Rx and Tx queues being assigned, causing a panic later in
driver reinitialization.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_main.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 8e270b6..a3572d1 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2350,8 +2350,6 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)
 		                      adapter->ring_feature[RING_F_DCB].indices;
 		ret = true;
 	} else {
-		adapter->ring_feature[RING_F_DCB].mask = 0;
-		adapter->ring_feature[RING_F_DCB].indices = 0;
 		ret = false;
 	}
 
@@ -2371,8 +2369,6 @@ static inline bool ixgbe_set_rss_queues(struct ixgbe_adapter *adapter)
 		                      adapter->ring_feature[RING_F_RSS].indices;
 		ret = true;
 	} else {
-		adapter->ring_feature[RING_F_RSS].mask = 0;
-		adapter->ring_feature[RING_F_RSS].indices = 0;
 		ret = false;
 	}
 


             reply	other threads:[~2009-02-07  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-07  8:33 Jeff Kirsher [this message]
2009-02-07 10:17 ` [net-next PATCH] ixgbe: Fix a set_num_queues() bug that can result in num_(r|t)x_queues = 0 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090207083257.15354.43853.stgit@lost.foo-projects.org \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter.p.waskiewicz.jr@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.