lkml.org 
[lkml]   [2003]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject2.6.0-test8-bk3 net/ipv4/tcp.c change broken?
The 2.6.0-test8-bk3 change to delay pending signals checking in
net/ipv4/tcp.c appears to be broken.

On machine A I run X and an xterm. Within that xterm I rlogin to
machine B. On machine B I start emacs in text mode (emacs -nw).

When machine A runs 2.6.0-test8-bk2 or older, emacs works as usual:
it uses the xterm's entire size, and responds correctly and instantly
to control characters like ^S (I-search, not xoff) and ^G (Quit).

When machine A runs 2.6.0-test8-bk3 or later, emacs starts in a
tiny 24 rows by 80 columns mode, ^S incorrectly sends xoff, ^G
isn't seen by emacs until after a one second delay, and similarly
there is a one second delay between exiting emacs and getting the
next shell prompt. While running emacs, if I beat on it with ^G
and ^L it eventually (after about 5-10 seconds) goes into the
xterm's full rows/columns mode.

Reverting 2.6.0-test8-bk3's net/ipv4/tcp.c patch (included below)
fixes these problems.

/Mikael

diff -ruN linux-2.6.0-test8-bk2/net/ipv4/tcp.c linux-2.6.0-test8-bk3/net/ipv4/tcp.c
--- linux-2.6.0-test8-bk2/net/ipv4/tcp.c 2003-10-26 15:52:26.000000000 +0100
+++ linux-2.6.0-test8-bk3/net/ipv4/tcp.c 2003-10-26 15:51:58.000000000 +0100
@@ -1540,17 +1540,6 @@
if (copied && tp->urg_data && tp->urg_seq == *seq)
break;

- /* We need to check signals first, to get correct SIGURG
- * handling. FIXME: Need to check this doesn't impact 1003.1g
- * and move it down to the bottom of the loop
- */
- if (signal_pending(current)) {
- if (copied)
- break;
- copied = timeo ? sock_intr_errno(timeo) : -EAGAIN;
- break;
- }
-
/* Next get a buffer. */

skb = skb_peek(&sk->sk_receive_queue);
@@ -1587,6 +1576,7 @@
sk->sk_state == TCP_CLOSE ||
(sk->sk_shutdown & RCV_SHUTDOWN) ||
!timeo ||
+ signal_pending(current) ||
(flags & MSG_PEEK))
break;
} else {
@@ -1616,6 +1606,11 @@
copied = -EAGAIN;
break;
}
+
+ if (signal_pending(current)) {
+ copied = sock_intr_errno(timeo);
+ break;
+ }
}

cleanup_rbuf(sk, copied);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.025 / U:0.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site