]> git.baikalelectronics.ru Git - kernel.git/commit
net: initialize net->net_cookie at netns setup
authorEric Dumazet <edumazet@google.com>
Wed, 10 Feb 2021 14:41:44 +0000 (06:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2021 22:10:07 +0000 (14:10 -0800)
commitdda30da9d3f0a10fecafb9430058d1a9a281df51
tree87071c9aa3fd53cdbadadd99deaefec3100d270b
parent455f288d330df13d8a89575172e5ffff27ba1cb5
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>
include/net/net_namespace.h
net/core/filter.c
net/core/net_namespace.c