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

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

diff -u --recursive --new-file v2.1.118/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -707,7 +707,7 @@
 	int copied  = 0;
 
 	/* Verify that the socket is locked */
-	if (!sk->sock_readers)
+	if (!atomic_read(&sk->sock_readers))
 		printk("tcp_do_sendmsg: socket not locked!\n");
 
 	/* Wait for a connection to finish. */
@@ -1389,7 +1389,7 @@
 	 * Check whether the socket is locked ... supposedly
 	 * it's impossible to tcp_close() a locked socket.
 	 */
-	if (sk->sock_readers)
+	if (atomic_read(&sk->sock_readers))
 		printk("tcp_close: socket already locked!\n");
 
 	/* We need to grab some memory, and put together a FIN,

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