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

Next file: linux/net/ipv4/tcp.c
Previous file: linux/mm/swapfile.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.118/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
@@ -152,7 +152,7 @@
 	int type = skb->h.icmph->type;
 	int code = skb->h.icmph->code;
 
-	if (sk->ip_recverr && !sk->sock_readers) {
+	if (sk->ip_recverr && !atomic_read(&sk->sock_readers)) {
 		struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
 		if (skb2 && sock_queue_err_skb(sk, skb2))
 			kfree_skb(skb);
@@ -194,7 +194,7 @@
 	
 	skb->h.raw = skb->nh.raw;
 
-	if (sk->sock_readers) {
+	if (atomic_read(&sk->sock_readers)) {
 		__skb_queue_tail(&sk->back_log, skb);
 		return 0;
 	}

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