diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-11 17:05:28 +0000 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-09-12 19:10:01 +0200 |
commit | b49d252216e4f9e3030865b79d5ca16f050e4a19 (patch) | |
tree | 90ea166cdbe1f644fc26f6d7790088cd95a31fc8 /net | |
parent | cd8bae85815416d19f46e3828d457442f77de292 (diff) |
tcp: no longer release socket ownership in tcp_release_cb()
This partially reverts c3f9b01849ef ("tcp: tcp_release_cb()
should release socket ownership").
prequeue has been removed by Florian in commit e7942d0633c4
("tcp: remove prequeue support")
__tcp_checksum_complete_user() being gone, we no longer
have to release socket ownership in tcp_release_cb().
This is a prereq for third patch in the series
("net: call prot->release_cb() when processing backlog").
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/sock.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 10 |
2 files changed, 0 insertions, 13 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 16584e2dd648..21610e3845a5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -3519,9 +3519,6 @@ void release_sock(struct sock *sk) if (sk->sk_backlog.tail) __release_sock(sk); - /* Warning : release_cb() might need to release sk ownership, - * ie call sock_release_ownership(sk) before us. - */ if (sk->sk_prot->release_cb) sk->sk_prot->release_cb(sk); diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ccfc8bbf7455..b4cac12d0e63 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1101,16 +1101,6 @@ void tcp_release_cb(struct sock *sk) tcp_tsq_write(sk); __sock_put(sk); } - /* Here begins the tricky part : - * We are called from release_sock() with : - * 1) BH disabled - * 2) sk_lock.slock spinlock held - * 3) socket owned by us (sk->sk_lock.owned == 1) - * - * But following code is meant to be called from BH handlers, - * so we should keep BH disabled, but early release socket ownership - */ - sock_release_ownership(sk); if (flags & TCPF_WRITE_TIMER_DEFERRED) { tcp_write_timer_handler(sk); |