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>
This commit is contained in:
Eric Dumazet 2014-09-09 08:24:53 -07:00 коммит произвёл David S. Miller
Родитель cc9c668a08
Коммит 416c51e17b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
}