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

Next file: linux/net/ipv4/arp.c
Previous file: linux/net/ipv4/Config.in
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.64/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -291,7 +291,7 @@
 {
 	struct sk_buff *skb;
 
-  	sk->inuse = 1;			/* just to be safe. */
+	lock_sock(sk);			/* just to be safe. */
 
   	remove_sock(sk);
   
@@ -425,7 +425,7 @@
 		/* actually it can if an ack has just been sent. */
 		sk->destroy = 1;
 		sk->ack_backlog = 0;
-		sk->inuse = 0;
+		release_sock(sk);
 		reset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME);
   	}
 }
@@ -816,7 +816,7 @@
 		sti();
 		sk->dead = 1;
 	}
-	sk->inuse = 1;
+	lock_sock(sk);
 
 	/* This will destroy it. */
 	sock->data = NULL;

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