From: Eric Dumazet <eric.dumazet@gmail.com>
To: Sylvain Munaut <s.munaut@whatever-company.com>
Cc: netdev@vger.kernel.org
Subject: Re: NULL deref in bnx2 / crashes ? ( was: netconsole leads to stalled CPU task )
Date: Wed, 22 Aug 2012 15:05:57 +0200 [thread overview]
Message-ID: <1345640757.5158.1321.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAF6-1L6zr5WJxo6FVk+2ya=EEs++u3x9iSrDxX-weBofLJuA1g@mail.gmail.com>
On Wed, 2012-08-22 at 14:17 +0200, Sylvain Munaut wrote:
> Hi,
>
> > Could be the infamous slave_dev_queue_mapping striking again.
> >
> > Could you please try :
> >
> > diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> > index 346b1eb..df731a0 100644
> > --- a/net/core/netpoll.c
> > +++ b/net/core/netpoll.c
> > @@ -335,8 +335,11 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
> > /* don't get messages out of order, and no recursion */
> > if (skb_queue_len(&npinfo->txq) == 0 && !netpoll_owner_active(dev)) {
> > struct netdev_queue *txq;
> > + int queue_index = skb_get_queue_mapping(skb);
> >
> > - txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
> > + if (queue_index >= dev->real_num_tx_queues)
> > + queue_index = 0;
> > + txq = netdev_get_tx_queue(dev, queue_index);
> >
> > /* try until next clock tick */
> > for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
>
>
> Well, it doesn't solve the problem :(
>
> It does have an effect though. Now even on the machine with the
> broadcom card, it just freeze the machine ...
> On the machine with intel card, it actually does get a couple of
> netconsole packet out and then freeze as well.
>
my patch was incomplete, sorry :
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 346b1eb..ddc453b 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -335,8 +335,13 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
/* don't get messages out of order, and no recursion */
if (skb_queue_len(&npinfo->txq) == 0 && !netpoll_owner_active(dev)) {
struct netdev_queue *txq;
+ int queue_index = skb_get_queue_mapping(skb);
- txq = netdev_get_tx_queue(dev, skb_get_queue_mapping(skb));
+ if (queue_index >= dev->real_num_tx_queues) {
+ queue_index = 0;
+ skb_set_queue_mapping(skb, 0);
+ }
+ txq = netdev_get_tx_queue(dev, queue_index);
/* try until next clock tick */
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
next prev parent reply other threads:[~2012-08-22 13:06 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 [this message]
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
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=1345640757.5158.1321.camel@edumazet-glaptop \
--to=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