patch-1.3.65 linux/net/ipv4/packet.c

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

diff -u --recursive --new-file v1.3.64/linux/net/ipv4/packet.c linux/net/ipv4/packet.c
@@ -104,7 +104,6 @@
 	{
 		skb->sk = NULL;
 		kfree_skb(skb, FREE_READ);
-		release_sock(sk);		
 		return 0;
 	}
 	/*
@@ -211,7 +210,7 @@
 	 *	Stop more data and kill the socket off.
 	 */
 
-	sk->inuse = 1;
+	lock_sock(sk);
 	sk->state = TCP_CLOSE;
 
 	/*
@@ -444,13 +443,8 @@
 	 *	races and re-entrancy issues from us.
 	 */
 
-	skb_free_datagram(skb);
+	skb_free_datagram(sk, skb);
 
-	/*
-	 *	We are done.
-	 */
-	 
-	release_sock(sk);
 	return(copied);
 }
 

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