Re: Detailed report on SMB-build lockups [seems that it is lockingproblem in networking code] (2.4.0-test2-ac2 and later) [PATCH]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Folks,

Please see the patch below which ensures that the brlock stays held if
feeding packets back into the stack, and disables local bhs during the
call.

Alexander: if possible, would you please see if the patch fixes the
problem for you (I'm not able to recreate it here).

Thanks.

- James
--
James Morris
<jmorris@intercode.com.au>


diff -urN linux-2.4.0-test3-pre9.orig/net/core/netfilter.c linux/net/core/netfilter.c
--- linux-2.4.0-test3-pre9.orig/net/core/netfilter.c	Sun May 28 23:08:48 2000
+++ linux/net/core/netfilter.c	Wed Jul 12 02:27:59 2000
@@ -512,18 +512,23 @@
 				     info->indev, info->outdev, &elem,
 				     info->okfn);
 	}
-	br_read_unlock_bh(BR_NETPROTO_LOCK);
 
 	switch (verdict) {
 	case NF_ACCEPT:
+		/* Special case for packets heading back into the stack */
+		local_bh_disable(); 
 		info->okfn(skb);
+		local_bh_enable();
+		br_read_unlock_bh(BR_NETPROTO_LOCK);
 		break;
 
 	case NF_QUEUE:
+		br_read_unlock_bh(BR_NETPROTO_LOCK);
 		nf_queue(skb, elem, info->pf, info->hook, 
 			 info->indev, info->outdev, info->okfn);
 
 	case NF_DROP:
+		br_read_unlock_bh(BR_NETPROTO_LOCK);
 		kfree_skb(skb);
 		break;
 	}

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux