ipv6: ip6_ptr rcu annotations
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 24 Oct 2010 21:32:05 +0000 (21:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Oct 2010 20:09:43 +0000 (13:09 -0700)
(struct net_device)->ip6_ptr is rcu protected :

add __rcu annotation and proper rcu primitives.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c

index ceefb441c2369c76ccab929aea6eb2875a989c79..4722d4a9b58f2a98ed451ee069b6037931e84090 100644 (file)
@@ -952,7 +952,7 @@ struct net_device {
        void                    *atalk_ptr;     /* AppleTalk link       */
        struct in_device __rcu  *ip_ptr;        /* IPv4 specific data   */
        void                    *dn_ptr;        /* DECnet specific data */
-       void                    *ip6_ptr;       /* IPv6 specific data */
+       struct inet6_dev __rcu  *ip6_ptr;       /* IPv6 specific data */
        void                    *ec_ptr;        /* Econet specific data */
        void                    *ax25_ptr;      /* AX.25 specific data */
        struct wireless_dev     *ieee80211_ptr; /* IEEE 802.11 specific data,
index 2c7da3ab4684e26decc34afdbf883fbf96237461..365f7f5077e4bc02c9c6e05e9a7c80274d37f760 100644 (file)
@@ -5416,7 +5416,7 @@ void netdev_run_todo(void)
                /* paranoia */
                BUG_ON(netdev_refcnt_read(dev));
                WARN_ON(rcu_dereference_raw(dev->ip_ptr));
-               WARN_ON(dev->ip6_ptr);
+               WARN_ON(rcu_dereference_raw(dev->ip6_ptr));
                WARN_ON(dev->dn_ptr);
 
                if (dev->destructor)