The following commit has been merged in the batman-adv/next branch: commit 56892261ed1a854db5363df8bb3fbdb2c6c28d4c Author: Fan Du fan.du@windriver.com Date: Thu Aug 16 17:51:25 2012 +0800
xfrm: Use rcu_dereference_bh to deference pointer protected by rcu_read_lock_bh
Signed-off-by: Fan Du fan.du@windriver.com Signed-off-by: David S. Miller davem@davemloft.net
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 5ad4d2c..6405764 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -2501,11 +2501,11 @@ static void __net_init xfrm_dst_ops_init(struct net *net) struct xfrm_policy_afinfo *afinfo;
rcu_read_lock_bh(); - afinfo = rcu_dereference(xfrm_policy_afinfo[AF_INET]); + afinfo = rcu_dereference_bh(xfrm_policy_afinfo[AF_INET]); if (afinfo) net->xfrm.xfrm4_dst_ops = *afinfo->dst_ops; #if IS_ENABLED(CONFIG_IPV6) - afinfo = rcu_dereference(xfrm_policy_afinfo[AF_INET6]); + afinfo = rcu_dereference_bh(xfrm_policy_afinfo[AF_INET6]); if (afinfo) net->xfrm.xfrm6_dst_ops = *afinfo->dst_ops; #endif