Patch for wrong poll reason in sigio

Stephen C. Tweedie (sct@redhat.com)
Fri, 10 Dec 1999 15:52:15 GMT


Hi Linus,

This was kicked around last week: tcp_rcv_synsent_state_process gets the
poll reason wrong for syn packets. The same case in
tcp_rcv_state_process() gets correctly handled as POLL_OUT: it's the
establishment of a new connection so we can start sending data: but in
SYN-SENT state we get a POLL_IN sigio instead, so we miss the start of
the outgoing data stream if we are doing all our IO using rtsigio.

The patch has been passed through linux-net and Andi Kleen has verified
it's OK; it also fixes the test case which brought the problem to light
in the first place. Davem asked me to queue it straight to you.

--Stephen

----------------------------------------------------------------
--- net/ipv4/tcp_input.c~ Fri Nov 12 12:55:38 1999
+++ net/ipv4/tcp_input.c Fri Nov 26 23:12:12 1999
@@ -2760,7 +2760,7 @@

if(!sk->dead) {
wake_up_interruptible(sk->sleep);
- sock_wake_async(sk->socket, 0, POLL_IN);
+ sock_wake_async(sk->socket, 0, POLL_OUT);
}
return -1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu