patch-2.1.34 linux/net/ax25/ax25_std_timer.c

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

diff -u --recursive --new-file v2.1.33/linux/net/ax25/ax25_std_timer.c linux/net/ax25/ax25_std_timer.c
@@ -66,7 +66,8 @@
 			 * Check the state of the receive buffer.
 			 */
 			if (ax25->sk != NULL) {
-				if (ax25->sk->rmem_alloc < (ax25->sk->rcvbuf / 2) && (ax25->condition & AX25_COND_OWN_RX_BUSY)) {
+				if (atomic_read(&ax25->sk->rmem_alloc) < (ax25->sk->rcvbuf / 2) &&
+				    (ax25->condition & AX25_COND_OWN_RX_BUSY)) {
 					ax25->condition &= ~AX25_COND_OWN_RX_BUSY;
 					ax25->condition &= ~AX25_COND_ACK_PENDING;
 					ax25_send_control(ax25, AX25_RR, AX25_POLLOFF, AX25_RESPONSE);

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