mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Revert "tcp: fix races in tcp_abort()"
This reverts commit cae9d2b162 which is
commit 5ce4645c23cf5f048eb8e9ce49e514bababdee85 upstream.
It breaks Android testing and can be brought back in the future
in an safe way if it is really needed.
Bug: 411037744
Change-Id: I02ba2e4b3c519bad7686ddec5fa8a8ff7036768b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -4739,9 +4739,13 @@ int tcp_abort(struct sock *sk, int err)
|
||||
bh_lock_sock(sk);
|
||||
|
||||
if (!sock_flag(sk, SOCK_DEAD)) {
|
||||
WRITE_ONCE(sk->sk_err, err);
|
||||
/* This barrier is coupled with smp_rmb() in tcp_poll() */
|
||||
smp_wmb();
|
||||
sk_error_report(sk);
|
||||
if (tcp_need_reset(sk->sk_state))
|
||||
tcp_send_active_reset(sk, GFP_ATOMIC);
|
||||
tcp_done_with_error(sk, err);
|
||||
tcp_done(sk);
|
||||
}
|
||||
|
||||
bh_unlock_sock(sk);
|
||||
|
||||
Reference in New Issue
Block a user