Re: [PATCH net-next v10 09/11] vxlan: add ipv6 proxy support
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-08-28 16:13:32
From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2013-08-28 16:13:32
On Wed, 28 Aug 2013 13:22:57 +0800 Cong Wang [off-list ref] wrote:
+#if IS_ENABLED(CONFIG_IPV6)
+static int neigh_reduce(struct net_device *dev, struct sk_buff *skb)
+{
+ struct vxlan_dev *vxlan = netdev_priv(dev);
+ struct neighbour *n;
+ union vxlan_addr ipa;
+ const struct ipv6hdr *iphdr;
+ const struct in6_addr *saddr, *daddr;
+ struct nd_msg *msg;
+ struct inet6_dev *in6_dev = NULL;
+
+ WARN_ON(!rcu_read_lock_held() && !rcu_read_lock_bh_held());You may have needed warn during debugging, but you should be able to audit all the codepaths (this is a static function) to be sure that this code is correct (ie rcu lock always held).