summaryrefslogtreecommitdiffstats
path: root/net/core/net_namespace.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2014-09-09 08:24:53 -0700
committerDavid S. Miller <davem@davemloft.net>2014-09-09 20:10:45 -0700
commit416c51e17b8b31b574763ac2b88ee99ddbb0c85d (patch)
treeb75e6f3ca2bda3615dfa18a339287d15c41a4dc3 /net/core/net_namespace.c
parentcc9c668a0805cdf6141ffae3d8e9a94875ec7a54 (diff)
downloadlinux-416c51e17b8b31b574763ac2b88ee99ddbb0c85d.tar.gz
linux-416c51e17b8b31b574763ac2b88ee99ddbb0c85d.tar.bz2
linux-416c51e17b8b31b574763ac2b88ee99ddbb0c85d.zip
netns: remove one sparse warning
net/core/net_namespace.c:227:18: warning: incorrect type in argument 1 (different address spaces) net/core/net_namespace.c:227:18: expected void const *<noident> net/core/net_namespace.c:227:18: got struct net_generic [noderef] <asn:4>*gen We can use rcu_access_pointer() here as read-side access to the pointer was removed at least one grace period ago. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net_namespace.c')
-rw-r--r--net/core/net_namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 7c6b51a58968..7f155175bba8 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -224,7 +224,7 @@ static void net_free(struct net *net)
return;
}
#endif
- kfree(net->gen);
+ kfree(rcu_access_pointer(net->gen));
kmem_cache_free(net_cachep, net);
}