diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-08-11 15:30:52 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-12 05:55:28 -0400 |
commit | 33d480ce6d43326e2541fd79b3548858a174ec3c (patch) | |
tree | c938ee8c07a2e0f33178069b55439a54188f38fa /net/ipv4/ipmr.c | |
parent | cd28ca0a3dd17c68d24b839602a0e6268ad28b5d (diff) |
net: cleanup some rcu_dereference_raw
RCU api had been completed and rcu_access_pointer() or
rcu_dereference_protected() are better than generic
rcu_dereference_raw()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index f550285c977b..6164e982e0ef 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1203,7 +1203,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi | |||
1203 | return -ENOENT; | 1203 | return -ENOENT; |
1204 | 1204 | ||
1205 | if (optname != MRT_INIT) { | 1205 | if (optname != MRT_INIT) { |
1206 | if (sk != rcu_dereference_raw(mrt->mroute_sk) && | 1206 | if (sk != rcu_access_pointer(mrt->mroute_sk) && |
1207 | !capable(CAP_NET_ADMIN)) | 1207 | !capable(CAP_NET_ADMIN)) |
1208 | return -EACCES; | 1208 | return -EACCES; |
1209 | } | 1209 | } |
@@ -1230,7 +1230,7 @@ int ip_mroute_setsockopt(struct sock *sk, int optname, char __user *optval, unsi | |||
1230 | rtnl_unlock(); | 1230 | rtnl_unlock(); |
1231 | return ret; | 1231 | return ret; |
1232 | case MRT_DONE: | 1232 | case MRT_DONE: |
1233 | if (sk != rcu_dereference_raw(mrt->mroute_sk)) | 1233 | if (sk != rcu_access_pointer(mrt->mroute_sk)) |
1234 | return -EACCES; | 1234 | return -EACCES; |
1235 | return ip_ra_control(sk, 0, NULL); | 1235 | return ip_ra_control(sk, 0, NULL); |
1236 | case MRT_ADD_VIF: | 1236 | case MRT_ADD_VIF: |