From: Cong Wang <xiyou.wangcong@gmail.com>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>, netdev@vger.kernel.org
Subject: Re: NULL deref in bnx2 / crashes ? ( was: netconsole leads to stalled CPU task )
Date: Fri, 14 Sep 2012 21:22:41 +0800 [thread overview]
Message-ID: <50532FA1.3070706@gmail.com> (raw)
In-Reply-To: <CAF6-1L6RJkV6u4Rc2uDMQGUG23EGRKrdWSzTiHEYO9Z9ioGtaw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 904 bytes --]
On 09/14/2012 01:35 AM, Sylvain Munaut wrote:
> Hi,
>
>> Yes, but I have some worries of why it is needed.
>>
>> Isnt it covering a bug elsewhere ?
>
> That may very well be.
>
> Of the few test servers I have running the same kernel, I just found
> the one with netconsole active to be "stuck".
>
> Not frozen, but all user process are hanged up and it's spitting
> message about processes and CPU being "stuck". The trace is different
> in each case depending on what the process was actually doing at the
> time it got stuck.
>
> No message sent to the netconsole with the root cause and nothing was
> written in the logs ...
>
Yeah, in this case, kdump is your friend. :)
Anyway, I think Eric is right, the bug may be in other place. I am
wondering if the attached patch could help? It seems in netpoll tx path,
we miss the chance of calling ->ndo_select_queue().
Please give it a try.
Thanks!
[-- Attachment #2: netpoll-txq.diff --]
[-- Type: text/x-patch, Size: 1645 bytes --]
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ae3153c0..72661f6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1403,6 +1403,9 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,
f(dev, &dev->_tx[i], arg);
}
+extern struct netdev_queue *netdev_pick_tx(struct net_device *dev,
+ struct sk_buff *skb);
+
/*
* Net namespace inlines
*/
diff --git a/net/core/dev.c b/net/core/dev.c
index b1e6d63..d76bf73 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2381,8 +2381,8 @@ static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb)
#endif
}
-static struct netdev_queue *dev_pick_tx(struct net_device *dev,
- struct sk_buff *skb)
+struct netdev_queue *netdev_pick_tx(struct net_device *dev,
+ struct sk_buff *skb)
{
int queue_index;
const struct net_device_ops *ops = dev->netdev_ops;
@@ -2556,7 +2556,7 @@ int dev_queue_xmit(struct sk_buff *skb)
skb_update_prio(skb);
- txq = dev_pick_tx(dev, skb);
+ txq = netdev_pick_tx(dev, skb);
q = rcu_dereference_bh(txq->qdisc);
#ifdef CONFIG_NET_CLS_ACT
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index dd67818..77a0388 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -328,7 +328,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
if (skb_queue_len(&npinfo->txq) == 0 && !netpoll_owner_active(dev)) {
struct netdev_queue *txq;
- txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
+ txq = netdev_pick_tx(dev, skb);
/* try until next clock tick */
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
next prev parent reply other threads:[~2012-09-14 13:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 10:53 NULL deref in bnx2 / crashes ? ( was: netconsole leads to stalled CPU task ) Sylvain Munaut
2012-08-22 11:13 ` Eric Dumazet
2012-08-22 12:17 ` Sylvain Munaut
2012-08-22 13:05 ` Eric Dumazet
2012-08-22 14:29 ` Sylvain Munaut
2012-08-22 15:40 ` Cong Wang
2012-08-23 7:57 ` Cong Wang
2012-08-23 8:31 ` Cong Wang
2012-08-23 9:12 ` Cong Wang
2012-08-24 9:50 ` Sylvain Munaut
2012-08-25 8:01 ` Cong Wang
2012-08-25 2:20 ` Lin Ming
2012-09-12 11:53 ` Sylvain Munaut
2012-09-12 12:49 ` Cong Wang
2012-09-12 13:05 ` Eric Dumazet
2012-09-13 17:35 ` Sylvain Munaut
2012-09-14 13:22 ` Cong Wang [this message]
2012-09-14 15:36 ` Sylvain Munaut
2012-09-17 10:57 ` Sylvain Munaut
2012-09-17 15:17 ` Cong Wang
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=50532FA1.3070706@gmail.com \
--to=xiyou.wangcong@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=s.munaut@whatever-company.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).