From: Lee Revell <rlrevell@joe-job.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
vda@port.imtp.ilyichevsk.odessa.ua,
linux-kernel@gondor.apana.org.au, maxk@qualcomm.com,
irda-users@lists.sourceforge.net,
Linux Network Development <netdev@oss.sgi.com>,
Alain Schroeder <alain@parkautomat.net>
Subject: Re: [PATCH] Make netif_rx_ni preempt-safe
Date: Tue, 19 Oct 2004 20:22:18 -0400 [thread overview]
Message-ID: <1098231737.23628.42.camel@krustophenia.net> (raw)
In-Reply-To: <20041020000009.GA17246@gondor.apana.org.au>
On Tue, 2004-10-19 at 20:00, Herbert Xu wrote:
> On Tue, Oct 19, 2004 at 07:55:33PM -0400, Lee Revell wrote:
> >
> > --- include/linux/netdevice.h~ 2004-10-19 18:50:18.000000000 -0400
> > +++ include/linux/netdevice.h 2004-10-19 18:51:01.000000000 -0400
> > @@ -696,9 +696,11 @@
> > */
> > static inline int netif_rx_ni(struct sk_buff *skb)
> > {
> > + preempt_disable();
> > int err = netif_rx(skb);
>
> This is broken on older compilers.
How about this:
Signed-Off-By: Lee Revell <rlrevell@joe-job.com>
--- include/linux/netdevice.h~ 2004-10-19 20:16:48.000000000 -0400
+++ include/linux/netdevice.h 2004-10-19 20:21:01.000000000 -0400
@@ -696,9 +696,12 @@
*/
static inline int netif_rx_ni(struct sk_buff *skb)
{
- int err = netif_rx(skb);
+ int err;
+ preempt_disable();
+ err = netif_rx(skb);
if (softirq_pending(smp_processor_id()))
do_softirq();
+ preempt_enable();
return err;
}
next prev parent reply other threads:[~2004-10-20 0:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-19 23:55 [PATCH] Make netif_rx_ni preempt-safe Lee Revell
2004-10-20 0:00 ` Herbert Xu
2004-10-20 0:22 ` Lee Revell [this message]
2004-10-20 15:11 ` Denis Vlasenko
2004-10-20 16:47 ` Lee Revell
2004-10-20 19:14 ` Denis Vlasenko
2004-10-20 19:53 ` Lee Revell
2004-10-20 19:56 ` Denis Vlasenko
2004-10-20 20:25 ` Lee Revell
2004-10-20 20:32 ` Denis Vlasenko
2004-10-21 0:15 ` David S. Miller
2004-10-21 0:35 ` Herbert Xu
2004-10-21 4:58 ` 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=1098231737.23628.42.camel@krustophenia.net \
--to=rlrevell@joe-job.com \
--cc=akpm@osdl.org \
--cc=alain@parkautomat.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=irda-users@lists.sourceforge.net \
--cc=linux-kernel@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
--cc=netdev@oss.sgi.com \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/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).