[PATCH][EBTABLES] fix smp race
Bart De Schuymer <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Dave, 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-FFYn/[email protected]> cheers, Bart Signed-off-by: Bart De Schuymer <[email protected]> --- linux-2.6.11.3/net/bridge/netfilter/ebtables.c.old 2005-03-14 21:31:46.668325296 +0100 +++ linux-2.6.11.3/net/bridge/netfilter/ebtables.c 2005-03-14 21:40:48.474958168 +0100 @@ -179,9 +179,10 @@ unsigned int ebt_do_table (unsigned int 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) ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click