mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
BACKPORT: ANDROID: fix ABI by undoing atomic64_t -> u64 type conversion
This is pretty much a no-op, but avoids changing struct net ABI. Bug: 274789652 Test: builds, net_test Signed-off-by: Maciej Żenczykowski <maze@google.com> Change-Id: Ia744bdf0a026adccaef8382aaecc771a8d0763a6
This commit is contained in:
parent
a4bd8ebc0a
commit
c705a91305
3 changed files with 3 additions and 3 deletions
|
|
@ -171,7 +171,7 @@ struct net {
|
|||
struct netns_xfrm xfrm;
|
||||
#endif
|
||||
|
||||
u64 net_cookie; /* written once */
|
||||
atomic64_t net_cookie; /* written once */
|
||||
|
||||
#if IS_ENABLED(CONFIG_IP_VS)
|
||||
struct netns_ipvs *ipvs;
|
||||
|
|
|
|||
|
|
@ -4694,7 +4694,7 @@ static u64 __bpf_get_netns_cookie(struct sock *sk)
|
|||
{
|
||||
const struct net *net = sk ? sock_net(sk) : &init_net;
|
||||
|
||||
return net->net_cookie;
|
||||
return atomic64_read(&net->net_cookie);
|
||||
}
|
||||
|
||||
BPF_CALL_1(bpf_get_netns_cookie_sock, struct sock *, ctx)
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)
|
|||
refcount_set(&net->passive, 1);
|
||||
get_random_bytes(&net->hash_mix, sizeof(u32));
|
||||
preempt_disable();
|
||||
net->net_cookie = gen_cookie_next(&net_cookie);
|
||||
atomic64_set(&net->net_cookie, gen_cookie_next(&net_cookie));
|
||||
preempt_enable();
|
||||
net->dev_base_seq = 1;
|
||||
net->user_ns = user_ns;
|
||||
|
|
|
|||
Loading…
Reference in a new issue