]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] Fix smp race.
authorbdschuym@pandora.be <bdschuym@pandora.be>
Tue, 15 Mar 2005 05:22:31 +0000 (21:22 -0800)
committer <chrisw@vas.sous-sol.org> <>
Fri, 27 May 2005 04:20:02 +0000 (21:20 -0700)
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>
net/bridge/netfilter/ebtables.c

index 33dde2be31ba3ef2f0a3b0630f7490db0390670d..771105c927be47b5545df4c7a99376ec125c20a1 100644 (file)
@@ -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)