patch-2.1.127 linux/net/ipv4/af_inet.c

Next file: linux/net/ipv4/arp.c
Previous file: linux/net/core/sysctl_net_core.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.126/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -464,7 +464,7 @@
 	struct sock *sk = sock->sk;
 
 	if (sk) {
-		unsigned long timeout;
+		long timeout;
 
 		/* Begin closedown and wake up sleepers. */
 		if (sock->state != SS_UNCONNECTED)
@@ -483,11 +483,11 @@
 		 */
 		timeout = 0;
 		if (sk->linger && !(current->flags & PF_EXITING)) {
-			timeout = ~0UL;
+			timeout = MAX_SCHEDULE_TIMEOUT;
 
 			/* XXX This makes no sense whatsoever... -DaveM */
 			if (!sk->lingertime)
-				timeout = jiffies + HZ*sk->lingertime;
+				timeout = HZ*sk->lingertime;
 		}
 		sock->sk = NULL;
 		sk->socket = NULL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov