--- zzzz-none-000/linux-5.4.213/net/core/sock_diag.c 2022-09-15 10:04:56.000000000 +0000 +++ alder-5690pro-762/linux-5.4.213/net/core/sock_diag.c 2024-08-14 09:02:13.000000000 +0000 @@ -19,19 +19,6 @@ static int (*inet_rcv_compat)(struct sk_buff *skb, struct nlmsghdr *nlh); static DEFINE_MUTEX(sock_diag_table_mutex); static struct workqueue_struct *broadcast_wq; -static atomic64_t cookie_gen; - -u64 sock_gen_cookie(struct sock *sk) -{ - while (1) { - u64 res = atomic64_read(&sk->sk_cookie); - - if (res) - return res; - res = atomic64_inc_return(&cookie_gen); - atomic64_cmpxchg(&sk->sk_cookie, 0, res); - } -} int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie) {