Thread (13 messages) flat view 13 messages, 4 authors, 2004-10-21

Re: [PATCH] Make netif_rx_ni preempt-safe

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2004-10-21 00:38:30
Also in: lkml

On Wed, Oct 20, 2004 at 05:15:08PM -0700, David S. Miller wrote:
 
+int netif_rx_ni(struct sk_buff *skb)
+{
+       int err = netif_rx(skb);
+
+       preempt_disable();
+       if (softirq_pending(smp_processor_id()))
+               do_softirq();
You need to move the netif_rx call inside the disable as otherwise
you might be checking the pending flag on the wrong CPU.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help