Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 066d2167 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: tcp: deal with listen sockets properly in tcp_abort."

parents 2a1e1b0c 868d8dae
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3067,6 +3067,11 @@ int tcp_abort(struct sock *sk, int err)
	/* Don't race with userspace socket closes such as tcp_close. */
	lock_sock(sk);

	if (sk->sk_state == TCP_LISTEN) {
		tcp_set_state(sk, TCP_CLOSE);
		inet_csk_listen_stop(sk);
	}

	/* Don't race with BH socket closes such as inet_csk_listen_stop. */
	local_bh_disable();
	bh_lock_sock(sk);