patch-1.3.77 linux/net/ax25/af_ax25.c

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

diff -u --recursive --new-file v1.3.76/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
@@ -377,7 +377,7 @@
 				return;
 
 			copy->sk = sk;
-			sk->rmem_alloc += copy->truesize;
+			atomic_add(copy->truesize, &sk->rmem_alloc);
 			skb_queue_tail(&sk->receive_queue, copy);
 			if (!sk->dead)
 				sk->data_ready(sk, skb->len);
@@ -1727,7 +1727,7 @@
 						skb_pull(skb, 2);
 						skb_queue_tail(&sk->receive_queue, skb);
 						skb->sk = sk;
-						sk->rmem_alloc += skb->truesize;
+						atomic_add(skb->truesize, &sk->rmem_alloc);
 						if (!sk->dead)
 							sk->data_ready(sk, skb->len);
 					}

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