]> err.no Git - linux-2.6/blobdiff - net/core/netpoll.c
[PATCH] sunrpc: cache_register can use wrong module reference
[linux-2.6] / net / core / netpoll.c
index c02a08da6d42a3f59afee93de979e81e090d633f..a1a9a7abff50981c1e26fdcca3d2b7b2fa315d59 100644 (file)
@@ -357,7 +357,6 @@ static void arp_reply(struct sk_buff *skb)
        unsigned char *arp_ptr;
        int size, type = ARPOP_REPLY, ptype = ETH_P_ARP;
        u32 sip, tip;
-       unsigned long flags;
        struct sk_buff *send_skb;
        struct netpoll *np = NULL;
 
@@ -732,6 +731,9 @@ int netpoll_setup(struct netpoll *np)
        /* last thing to do is link it to the net device structure */
        ndev->npinfo = npinfo;
 
+       /* avoid racing with NAPI reading npinfo */
+       synchronize_rcu();
+
        return 0;
 
  release: