summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbdschuym@pandora.be <bdschuym@pandora.be>2005-03-14 21:22:31 -0800
committer <chrisw@vas.sous-sol.org>2005-05-26 21:20:02 -0700
commit5ba07d5c81af64d42937a4027ea7c930bdd8bf9e (patch)
tree75a6512dac67541bf9a76a5e2a5af129702547a6
parent973ed0feb6c29b170e4e57f25198403b1fee2dfb (diff)
[PATCH] Fix smp race.
The patch below fixes an smp race that happens on such systems under heavy load. This bug was reported and solved by Steve Herrell <steve_herrell@yahoo.ca> Signed-off-by: Bart De Schuymer <bdschuym@pandora.be> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@osdl.org>
-rw-r--r--net/bridge/netfilter/ebtables.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 33dde2be31ba..771105c927be 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -179,9 +179,10 @@ unsigned int ebt_do_table (unsigned int hook, struct sk_buff **pskb,
struct ebt_chainstack *cs;
struct ebt_entries *chaininfo;
char *base;
- struct ebt_table_info *private = table->private;
+ struct ebt_table_info *private;
read_lock_bh(&table->lock);
+ private = table->private;
cb_base = COUNTER_BASE(private->counters, private->nentries,
smp_processor_id());
if (private->chainstack)