summaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_connection_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2012-07-17 22:42:13 +0200
committerDavid S. Miller <davem@davemloft.net>2012-07-17 22:47:33 +0200
commit5abf7f7e0f6bdbfcac737f636497d7016d9507eb (patch)
treec52a21ed83a306c6626a00378934a28a6daa8db0 /net/ipv4/inet_connection_sock.c
parentipv4: Fix nexthop exception hash computation. (diff)
downloadlinux-5abf7f7e0f6bdbfcac737f636497d7016d9507eb.tar.xz
linux-5abf7f7e0f6bdbfcac737f636497d7016d9507eb.zip
ipv4: fix rcu splat
free_nh_exceptions() should use rcu_dereference_protected(..., 1) since its called after one RCU grace period. Also add some const-ification in recent code. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_connection_sock.c')
-rw-r--r--net/ipv4/inet_connection_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 3ea465286a39..c7a4de05ca04 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -806,8 +806,8 @@ EXPORT_SYMBOL_GPL(inet_csk_compat_setsockopt);
static struct dst_entry *inet_csk_rebuild_route(struct sock *sk, struct flowi *fl)
{
- struct inet_sock *inet = inet_sk(sk);
- struct ip_options_rcu *inet_opt;
+ const struct inet_sock *inet = inet_sk(sk);
+ const struct ip_options_rcu *inet_opt;
__be32 daddr = inet->inet_daddr;
struct flowi4 *fl4;
struct rtable *rt;