mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
UPSTREAM: net: initialize net->net_cookie at netns setup
It is simpler to make net->net_cookie a plain u64 written once in setup_net() instead of looping and using atomic64 helpers. Lorenz Bauer wants to add SO_NETNS_COOKIE socket option and this patch would makes his patch series simpler. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Lorenz Bauer <lmb@cloudflare.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Tested-by: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 3d368ab87cf6681f928de1ddf804d69600671bb2) Bug: 274789652 Tested: builds, net_test passes Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ia4d018b37af2792f0a21de028f724193797c5138
This commit is contained in:
parent
8852265bd3
commit
a4bd8ebc0a
3 changed files with 7 additions and 24 deletions
|
|
@ -171,7 +171,7 @@ struct net {
|
|||
struct netns_xfrm xfrm;
|
||||
#endif
|
||||
|
||||
atomic64_t net_cookie; /* written once */
|
||||
u64 net_cookie; /* written once */
|
||||
|
||||
#if IS_ENABLED(CONFIG_IP_VS)
|
||||
struct netns_ipvs *ipvs;
|
||||
|
|
@ -237,8 +237,6 @@ extern struct list_head net_namespace_list;
|
|||
struct net *get_net_ns_by_pid(pid_t pid);
|
||||
struct net *get_net_ns_by_fd(int fd);
|
||||
|
||||
u64 __net_gen_cookie(struct net *net);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
void ipx_register_sysctl(void);
|
||||
void ipx_unregister_sysctl(void);
|
||||
|
|
|
|||
Loading…
Reference in a new issue