Message ID | 1547787651-5119-1-git-send-email-laoar.shao@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [v2,net-next] net: sock: do not set sk_cookie in sk_clone_lock() | expand |
From: Yafang Shao <laoar.shao@gmail.com> Date: Fri, 18 Jan 2019 13:00:51 +0800 > The only call site of sk_clone_lock is in inet_csk_clone_lock, > and sk_cookie will be set there. > So we don't need to set sk_cookie in sk_clone_lock(). > > Reviewed-by: Eric Dumazet <edumazet@google.com> > Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Applied.
diff --git a/net/core/sock.c b/net/core/sock.c index f00902c..21e2a84 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1726,7 +1726,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) newsk->sk_err_soft = 0; newsk->sk_priority = 0; newsk->sk_incoming_cpu = raw_smp_processor_id(); - atomic64_set(&newsk->sk_cookie, 0); if (likely(newsk->sk_net_refcnt)) sock_inuse_add(sock_net(newsk), 1);