diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 18:21:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-23 18:21:44 +0300 |
commit | 6fbf248a20d362a92de60beee9474faca0b54eee (patch) | |
tree | b5365be73b420be3b6036fb40aaf1b167c90b180 /net/core/sock.c | |
parent | de4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5 (diff) | |
parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) | |
download | linux-6fbf248a20d362a92de60beee9474faca0b54eee.tar.xz |
Merge 4.14-rc6 into char-misc-next
We want the driver fixes in here and this resolves a merge issue with
the binder driver.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 23953b741a41..415f441c63b9 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1677,12 +1677,17 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_dst_pending_confirm = 0; newsk->sk_wmem_queued = 0; newsk->sk_forward_alloc = 0; + + /* sk->sk_memcg will be populated at accept() time */ + newsk->sk_memcg = NULL; + atomic_set(&newsk->sk_drops, 0); newsk->sk_send_head = NULL; newsk->sk_userlocks = sk->sk_userlocks & ~SOCK_BINDPORT_LOCK; atomic_set(&newsk->sk_zckey, 0); sock_reset_flag(newsk, SOCK_DONE); + cgroup_sk_alloc(&newsk->sk_cgrp_data); rcu_read_lock(); filter = rcu_dereference(sk->sk_filter); @@ -1714,9 +1719,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_incoming_cpu = raw_smp_processor_id(); atomic64_set(&newsk->sk_cookie, 0); - mem_cgroup_sk_alloc(newsk); - cgroup_sk_alloc(&newsk->sk_cgrp_data); - /* * Before updating sk_refcnt, we must commit prior changes to memory * (Documentation/RCU/rculist_nulls.txt for details) |