From: "David S. Miller" <davem@davemloft.net>
To: netdev@oss.sgi.com
Cc: mpm@selenic.com
Subject: serious netpoll bug w/NAPI
Date: Tue, 8 Feb 2005 20:16:34 -0800 [thread overview]
Message-ID: <20050208201634.03074349.davem@davemloft.net> (raw)
Consider a NAPI device currently executing it's poll function,
pushing SKBs into the networking stack.
Some of these will generate response packets etc.
If for some reason a printk() is generated by the packet processing
and:
1) the netconsole output device is the same as the NAPI device
processing packets
2) netif_queue_stopped() is true because the tx queue is full
the netpoll code will recurse back into the driver's poll function.
This is incredibly illegal and results in all kinds of driver state
corruption. ->poll() must execute only once at a time.
This situation is actually quite common, via the ipt_LOG.c packet
logging module.
What the netpoll code appears to be trying to do is get the TX
queue to make forward progress by invoking ->poll() if pending.
The trouble is, that ->poll() at the top level will not clear the
__LINK_STATE_RX_SCHED bit and delete itself from the poll list
until it is done with ->poll() processing.
So we get backtraces like:
tg3_rx()
tg3_poll()
poll_napi()
netpoll_poll()
write_msg()
..
printk()
...
ip_rcv()
...
netif_receive_skb()
tg3_rx()
tg3_poll()
net_rx_action()
__do_softirq()
do_softirq()
resulting in RX queue corruption in the driver and usually
NULL skb pointer dereferences.
next reply other threads:[~2005-02-09 4:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-09 4:16 David S. Miller [this message]
2005-02-09 18:32 ` serious netpoll bug w/NAPI Matt Mackall
2005-02-10 0:46 ` David S. Miller
2005-02-10 1:11 ` Matt Mackall
2005-02-10 9:16 ` Martin Josefsson
2005-02-10 17:14 ` Matt Mackall
2005-02-15 22:49 ` Jeff Moyer
2005-02-16 5:07 ` Matt Mackall
2005-02-16 19:26 ` Jeff Moyer
2005-02-16 22:07 ` Jeff Moyer
2005-02-16 23:02 ` David S. Miller
2005-02-16 23:44 ` Matt Mackall
2005-02-16 23:54 ` David S. Miller
2005-02-17 0:15 ` Matt Mackall
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=20050208201634.03074349.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=mpm@selenic.com \
--cc=netdev@oss.sgi.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).