From: bdschuym@pandora.be Date: Tue, 15 Mar 2005 05:22:31 +0000 (-0800) Subject: [PATCH] Fix smp race. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ba07d5c81af64d42937a4027ea7c930bdd8bf9e;p=thirdparty%2Fkernel%2Fstable.git [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 Signed-off-by: Bart De Schuymer Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman Signed-off-by: Chris Wright --- diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c index 33dde2be31ba3..771105c927be4 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)