Re: [PATCH nf-next,v2] netfilter: nft_counter: convert it to use per-cpu counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 19, 2015 at 11:50:12AM +0200, Patrick McHardy wrote:
> On 19.06, Pablo Neira Ayuso wrote:
> > On Fri, Jun 19, 2015 at 11:39:37AM +0200, Patrick McHardy wrote:
> > > > +	struct nft_counter_percpu_priv *priv = nft_expr_priv(expr);
> > > > +	struct nft_counter_percpu __percpu *cpu_stats;
> > > > +	struct nft_counter_percpu *this_cpu;
> > > > +
> > > > +	cpu_stats = netdev_alloc_pcpu_stats(struct nft_counter_percpu);
> > > > +	if (cpu_stats == NULL)
> > > > +		return ENOMEM;
> > > > +
> > > > +	preempt_disable();
> > > 
> > > Seems unnecessary, the stats are not active durign ->init().
> > 
> > I know, I need to find a better way to silent a lockdep preempt splat
> > that I'm getting here because of illegal use of this_cpu_ptr() with
> > preemption enabled.
> 
> Ok guess it doesn't really hurt.

I'm going to leave it in place, OK?
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux