From: Nishanth Aravamudan <nacc@us.ibm.com>
To: eric.dumazet@gmail.com
Cc: Nishanth Aravamudan <nacc@us.ibm.com>,
sonnyrao@us.ibm.com, Divy Le Ray <divy@chelsio.com>,
Dimitris Michailidis <dm@chelsio.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] cxgb3: fix crash due to manipulating queues before registration
Date: Wed, 27 Oct 2010 22:06:30 -0700 [thread overview]
Message-ID: <1288242390-28574-1-git-send-email-nacc@us.ibm.com> (raw)
In-Reply-To: <1288236563.2658.59.camel@edumazet-laptop>
Hi Eric,
Something like the following?:
Thanks,
Nish
Along the same lines as "cxgb4: fix crash due to manipulating queues
before registration" (8f6d9f40476895571df039b6f1f5230ec7faebad), before
commit "net: allocate tx queues in register_netdevice"
netif_tx_stop_all_queues and related functions could be used between
device allocation and registration but now only after registration.
cxgb4 has such a call before registration and crashes now. Move it
after register_netdev.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: eric.dumazet@gmail.com
Cc: sonnyrao@us.ibm.com
Cc: Divy Le Ray <divy@chelsio.com>
Cc: Dimitris Michailidis <dm@chelsio.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/net/cxgb3/cxgb3_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 4e3c123..96c70a5 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -3301,7 +3301,6 @@ static int __devinit init_one(struct pci_dev *pdev,
pi->rx_offload = T3_RX_CSUM | T3_LRO;
pi->port_id = i;
netif_carrier_off(netdev);
- netif_tx_stop_all_queues(netdev);
netdev->irq = pdev->irq;
netdev->mem_start = mmio_start;
netdev->mem_end = mmio_start + mmio_len - 1;
@@ -3342,6 +3341,7 @@ static int __devinit init_one(struct pci_dev *pdev,
adapter->name = adapter->port[i]->name;
__set_bit(i, &adapter->registered_device_map);
+ netif_tx_stop_all_queues(adapter->port[i]);
}
}
if (!adapter->registered_device_map) {
--
1.7.1
next prev parent reply other threads:[~2010-10-28 5:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-28 1:54 cxgb3: kernel access of bad area with v2.6.36-6794-g12ba8d1 Nishanth Aravamudan
2010-10-28 3:29 ` Eric Dumazet
2010-10-28 5:06 ` Nishanth Aravamudan [this message]
2010-10-28 5:18 ` [PATCH] cxgb3: fix crash due to manipulating queues before registration Eric Dumazet
2010-10-28 5:23 ` Nishanth Aravamudan
2010-10-28 17:28 ` David Miller
2010-10-28 6:35 ` Divy Le Ray
2010-10-28 17:28 ` 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=1288242390-28574-1-git-send-email-nacc@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=divy@chelsio.com \
--cc=dm@chelsio.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sonnyrao@us.ibm.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 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).