diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2009-04-02 00:53:49 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-02 00:54:43 -0700 |
commit | fa9a86ddc8ecd2830a5e773facc250f110300ae7 (patch) | |
tree | fb7120974ec38932aa909403c2598cbd01353b35 /net/ipv4/netfilter/ip_tables.c | |
parent | 8cbd9606a6367c221a7bbcc47f3ab1a8c31b6437 (diff) | |
download | op-kernel-dev-fa9a86ddc8ecd2830a5e773facc250f110300ae7.zip op-kernel-dev-fa9a86ddc8ecd2830a5e773facc250f110300ae7.tar.gz |
netfilter: use rcu_read_bh() in ipt_do_table()
Commit 784544739a25c30637397ace5489eeb6e15d7d49
(netfilter: iptables: lock free counters) forgot to disable BH
in arpt_do_table(), ipt_do_table() and ip6t_do_table()
Use rcu_read_lock_bh() instead of rcu_read_lock() cures the problem.
Reported-and-bisected-by: Roman Mindalev <r000n@r000n.net>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Patrick McHardy <kaber@trash.net>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/netfilter/ip_tables.c')
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 82ee7c9..810c0b6 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c @@ -339,7 +339,7 @@ ipt_do_table(struct sk_buff *skb, IP_NF_ASSERT(table->valid_hooks & (1 << hook)); - rcu_read_lock(); + rcu_read_lock_bh(); private = rcu_dereference(table->private); table_base = rcu_dereference(private->entries[smp_processor_id()]); @@ -437,7 +437,7 @@ ipt_do_table(struct sk_buff *skb, } } while (!hotdrop); - rcu_read_unlock(); + rcu_read_unlock_bh(); #ifdef DEBUG_ALLOW_ALL return NF_ACCEPT; |