Skip to content

Commit 0726f55

Browse files
laoardavem330
authored andcommitted
net: sock: do not set sk_cookie in sk_clone_lock()
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> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 65ea97d commit 0726f55

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎net/core/sock.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,7 +1752,6 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority)
17521752
newsk->sk_err_soft = 0;
17531753
newsk->sk_priority = 0;
17541754
newsk->sk_incoming_cpu = raw_smp_processor_id();
1755-
atomic64_set(&newsk->sk_cookie, 0);
17561755
if (likely(newsk->sk_net_refcnt))
17571756
sock_inuse_add(sock_net(newsk), 1);
17581757

0 commit comments

Comments
 (0)