From: Dave Peterson <dsp@llnl.gov>
To: robert.olsson@its.uu.se, netdev@oss.sgi.com
Subject: possible bug in net/core/pktgen.c (2.6.10 kernel)
Date: Fri, 14 Jan 2005 11:29:21 -0800 [thread overview]
Message-ID: <200501141129.21461.dsp@llnl.gov> (raw)
Hi,
I found a piece of code that looks problematic in the 2.6.10 kernel.
The following code appears starting on line 746 in function inject()
of net/core/pktgen.c:
if (netif_queue_stopped(odev) || need_resched()) {
u32 idle_start, idle;
idle_start = cycles();
do {
if (signal_pending(current)) {
info->do_run_run = 0;
break;
}
if (!netif_running(odev)) {
info->do_run_run = 0;
break;
}
if (need_resched())
schedule();
else
do_softirq();
} while (netif_queue_stopped(odev));
idle = cycles() - idle_start;
info->idle_acc += idle;
}
Notice the call to do_softirq() above. At this point it appears that
preemption is enabled. However, do_softirq() is written under the
assumption that it will be called with preemption disabled. It looks
like the code was originally written for the 2.4 kernel and this was
missed when kernel preemption was added in 2.5. Is this in fact a bug
or am I missing something? I haven't attempted to make a patch that
fixes this because I'm not too familiar with the networking code and
I'd rather let someone else determine what is the best way to fix it.
Dave Peterson
dsp@llnl.gov
next reply other threads:[~2005-01-14 19:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-14 19:29 Dave Peterson [this message]
2005-01-16 12:46 ` possible bug in net/core/pktgen.c (2.6.10 kernel) Robert Olsson
2005-01-18 17:35 ` Dave Peterson
2005-01-18 20:41 ` David S. Miller
2005-01-18 21:46 ` Dave Peterson
2005-01-18 21:50 ` David S. 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=200501141129.21461.dsp@llnl.gov \
--to=dsp@llnl.gov \
--cc=netdev@oss.sgi.com \
--cc=robert.olsson@its.uu.se \
/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).