[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <499BDCA3.8020604@trash.net>
Date: Wed, 18 Feb 2009 11:02:11 +0100
From: Patrick McHardy <kaber@...sh.net>
To: Stephen Hemminger <shemminger@...tta.com>
CC: David Miller <davem@...emloft.net>,
Rick Jones <rick.jones2@...com>,
Eric Dumazet <dada1@...mosbay.com>, netdev@...r.kernel.org,
netfilter-devel@...r.kernel.org
Subject: Re: [RFT 1/4] iptables: lock free counters
Stephen Hemminger wrote:
> @@ -1148,13 +1206,14 @@ static int do_add_counters(struct net *n
> goto free;
> }
>
> - write_lock_bh(&t->lock);
> + mutex_lock(&t->lock);
> private = t->private;
> if (private->number != num_counters) {
> ret = -EINVAL;
> goto unlock_up_free;
> }
>
> + preempt_disable();
> i = 0;
> /* Choose the copy that is on our node */
> loc_cpu_entry = private->entries[smp_processor_id()];
> @@ -1164,7 +1223,8 @@ static int do_add_counters(struct net *n
> paddc,
> &i);
> unlock_up_free:
> - write_unlock_bh(&t->lock);
> + mutex_unlock(&t->lock);
> +
> xt_table_unlock(t);
> module_put(t->me);
> free:
This part (arptables.c) seems to be missing a preempt_enable().
Other than this, the patch looks good to me, if you want I can
already apply this one.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists