patch-1.3.82 linux/net/ipv4/tcp.c

Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/ipv4/sysctl_net_ipv4.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.81/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -1439,6 +1439,17 @@
 			break;
 
 		/*
+		 * We need to check signals first, to get correct SIGURG
+		 * handling.
+		 */
+		if (current->signal & ~current->blocked) {
+			if (copied)
+				break;
+			copied = -ERESTARTSYS;
+			break;
+		}
+
+		/*
 		 *	Next get a buffer.
 		 */
 		 
@@ -1502,12 +1513,6 @@
 		schedule();
 		sk->socket->flags &= ~SO_WAITDATA;
 		lock_sock(sk);
-
-		if (current->signal & ~current->blocked) 
-		{
-			copied = -ERESTARTSYS;
-			break;
-		}
 		continue;
 
 	found_ok_skb:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this