aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorFan Du <fan.du@windriver.com>2012-08-16 05:51:25 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-16 22:39:22 -0400
commit56892261ed1a854db5363df8bb3fbdb2c6c28d4c (patch)
treebb40a59652c684133a8ab47a7c13d535acee8c8c /net/xfrm
parent02644a17457414f38e29f32d5c640b06d08fa092 (diff)
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>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 5ad4d2c4b83c..6405764eaa82 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)
2501 struct xfrm_policy_afinfo *afinfo; 2501 struct xfrm_policy_afinfo *afinfo;
2502 2502
2503 rcu_read_lock_bh(); 2503 rcu_read_lock_bh();
2504 afinfo = rcu_dereference(xfrm_policy_afinfo[AF_INET]); 2504 afinfo = rcu_dereference_bh(xfrm_policy_afinfo[AF_INET]);
2505 if (afinfo) 2505 if (afinfo)
2506 net->xfrm.xfrm4_dst_ops = *afinfo->dst_ops; 2506 net->xfrm.xfrm4_dst_ops = *afinfo->dst_ops;
2507#if IS_ENABLED(CONFIG_IPV6) 2507#if IS_ENABLED(CONFIG_IPV6)
2508 afinfo = rcu_dereference(xfrm_policy_afinfo[AF_INET6]); 2508 afinfo = rcu_dereference_bh(xfrm_policy_afinfo[AF_INET6]);
2509 if (afinfo) 2509 if (afinfo)
2510 net->xfrm.xfrm6_dst_ops = *afinfo->dst_ops; 2510 net->xfrm.xfrm6_dst_ops = *afinfo->dst_ops;
2511#endif 2511#endif