patch-1.3.22 linux/net/ipv4/arp.c

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

diff -u --recursive --new-file v1.3.21/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
@@ -42,6 +42,7 @@
  *		Mike Shaver     :       RFC1122 checks.
  *		Jonathan Naylor :	Only lookup the hardware address for
  *					the correct hardware type.
+ *		Germano Caronni	:	Assorted subtle races
  */
 
 /* RFC1122 Status:
@@ -278,6 +279,7 @@
 		skb_device_lock(skb);
 		restore_flags(flags);
 		dev_kfree_skb(skb, FREE_WRITE);
+		cli();
 	}
 	restore_flags(flags);
 	del_timer(&entry->timer);
@@ -556,8 +558,10 @@
 	{
 		if (entry->ip == ip_addr)
 		{
-			if ((entry->flags & ATF_PERM) && !force)
+			if ((entry->flags & ATF_PERM) && !force) {
+				sti();
 				return;
+			}
 			*pentry = entry->next;
 			del_timer(&entry->timer);
 			sti();

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this