patch-2.1.34 linux/net/core/datagram.c

Next file: linux/net/core/dev.c
Previous file: linux/net/ax25/sysctl_net_ax25.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.33/linux/net/core/datagram.c linux/net/core/datagram.c
@@ -123,7 +123,7 @@
 			goto no_packet;
 
 		wait_for_packet(sk);
-	  }
+	}
 
 	/* Again only user level code calls this function, so nothing interrupt level
 	   will suddenly eat the receive_queue */
@@ -228,7 +228,7 @@
 			if (sock_wspace(sk) >= MIN_WRITE_SPACE)
 				mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
 		} else {
-			if (sk->sndbuf-sk->wmem_alloc >= MIN_WRITE_SPACE)
+			if (sk->sndbuf - atomic_read(&sk->wmem_alloc) >= MIN_WRITE_SPACE)
 				mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
 		}
 	}

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