Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: ip6_ptr rcu annotations

(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>

authored by

Eric Dumazet and committed by
David S. Miller
198caeca b616b09a

+2 -2
+1 -1
include/linux/netdevice.h
··· 952 952 void *atalk_ptr; /* AppleTalk link */ 953 953 struct in_device __rcu *ip_ptr; /* IPv4 specific data */ 954 954 void *dn_ptr; /* DECnet specific data */ 955 - void *ip6_ptr; /* IPv6 specific data */ 955 + struct inet6_dev __rcu *ip6_ptr; /* IPv6 specific data */ 956 956 void *ec_ptr; /* Econet specific data */ 957 957 void *ax25_ptr; /* AX.25 specific data */ 958 958 struct wireless_dev *ieee80211_ptr; /* IEEE 802.11 specific data,
+1 -1
net/core/dev.c
··· 5416 5416 /* paranoia */ 5417 5417 BUG_ON(netdev_refcnt_read(dev)); 5418 5418 WARN_ON(rcu_dereference_raw(dev->ip_ptr)); 5419 - WARN_ON(dev->ip6_ptr); 5419 + WARN_ON(rcu_dereference_raw(dev->ip6_ptr)); 5420 5420 WARN_ON(dev->dn_ptr); 5421 5421 5422 5422 if (dev->destructor)