diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 0c3040a63ebd..f381e7c7a4d9 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -4581,6 +4581,7 @@ int tcp_abort(struct sock *sk, int err) bh_unlock_sock(sk); local_bh_enable(); tcp_write_queue_purge(sk); + printk("%s, %p\n", __func__, sk); if (!has_current_bpf_ctx()) release_sock(sk); return 0; diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 27140e5cdc06..0045e276c5cf 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1253,6 +1253,7 @@ int tcp_md5_do_add(struct sock *sk, const union tcp_md5_addr *addr, md5sig = rcu_dereference_protected(tp->md5sig_info, lockdep_sock_is_held(sk)); rcu_assign_pointer(tp->md5sig_info, NULL); kfree_rcu(md5sig, rcu); + printk("%s, %p \n", __func__, md5sig); return -EUSERS; } } @@ -1278,6 +1279,7 @@ int tcp_md5_key_copy(struct sock *sk, const union tcp_md5_addr *addr, md5sig = rcu_dereference_protected(tp->md5sig_info, lockdep_sock_is_held(sk)); net_warn_ratelimited("Too many TCP-MD5 keys in the system\n"); rcu_assign_pointer(tp->md5sig_info, NULL); + printk("%s, %p \n", __func__, md5sig); kfree_rcu(md5sig, rcu); return -EUSERS; } @@ -1299,6 +1301,7 @@ int tcp_md5_do_del(struct sock *sk, const union tcp_md5_addr *addr, int family, return -ENOENT; hlist_del_rcu(&key->node); atomic_sub(sizeof(*key), &sk->sk_omem_alloc); + printk("%s, %p \n", __func__, key); kfree_rcu(key, rcu); return 0; } @@ -1316,6 +1319,7 @@ static void tcp_clear_md5_list(struct sock *sk) hlist_for_each_entry_safe(key, n, &md5sig->head, node) { hlist_del_rcu(&key->node); atomic_sub(sizeof(*key), &sk->sk_omem_alloc); + printk("%s, %p \n", __func__, key); kfree_rcu(key, rcu); } } @@ -2318,6 +2322,7 @@ void tcp_v4_destroy_sock(struct sock *sk) /* Clean up the MD5 key list, if any */ if (tp->md5sig_info) { tcp_clear_md5_list(sk); + printk("%s, %p \n", __func__, tp->md5sig_info); kfree_rcu(rcu_dereference_protected(tp->md5sig_info, 1), rcu); tp->md5sig_info = NULL; static_branch_slow_dec_deferred(&tcp_md5_needed); diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ccfc8bbf7455..ae43546cb648 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1101,6 +1101,7 @@ void tcp_release_cb(struct sock *sk) tcp_tsq_write(sk); __sock_put(sk); } + printk("%p, %s\n", sk, __func__); /* Here begins the tricky part : * We are called from release_sock() with : * 1) BH disabled