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

Commit b634f875 authored by Alexandra Kossovsky's avatar Alexandra Kossovsky Committed by David S. Miller
Browse files

tcp: Fix OOB POLLIN avoidance.



From: Alexandra.Kossovsky@oktetlabs.ru

Fixes kernel bugzilla #15541

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 22001a13
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -429,7 +429,7 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
		if (tp->urg_seq == tp->copied_seq &&
		    !sock_flag(sk, SOCK_URGINLINE) &&
		    tp->urg_data)
			target--;
			target++;

		/* Potential race condition. If read of tp below will
		 * escape above sk->sk_state, we can be illegally awaken