| Kernel v2.4.1 /net/core/netfilter.c |
|---|
 2.4.1
 net
 core
 netfilter.c
diff -u --recursive --new-file v2.4.0/linux/net/core/netfilter.c linux/net/core/netfilter.c
--- v2.4.0/linux/net/core/netfilter.c Fri Aug 4 13:07:24 2000
+++ linux/net/core/netfilter.c Mon Jan 22 13:30:21 2001
@@ -442,7 +442,6 @@
}
}
-/* We have BR_NETPROTO_LOCK here */
int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb,
struct net_device *indev,
struct net_device *outdev,
@@ -452,6 +451,9 @@
unsigned int verdict;
int ret = 0;
+ /* We may already have this, but read-locks nest anyway */
+ br_read_lock_bh(BR_NETPROTO_LOCK);
+
#ifdef CONFIG_NETFILTER_DEBUG
if (skb->nf_debug & (1 << hook)) {
printk("nf_hook: hook %i already set.\n", hook);
@@ -479,6 +481,7 @@
break;
}
+ br_read_unlock_bh(BR_NETPROTO_LOCK);
return ret;
}
|