Re: [PATCH nf-next 2/4] netfilter: nft_set_pipapo: do not rely on ZERO_SIZE_PTR

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

 



Stefano Brivio <sbrivio@xxxxxxxxxx> wrote:
> > -	fill_map = kcalloc(m->bsize_max, sizeof(*res_map), GFP_ATOMIC);
> > +	fill_map = kcalloc(m->bsize_max, sizeof(*res_map), GFP_KERNEL);
> 
> I haven't re-checked the whole logic, but can't nft_pipapo_deactivate()
> (hence pipapo_deactivate() and pipapo_get()) be called from the data
> path for some reason?

Not that I know.  Deactivate turns off an element in the next generation
and that concept is tied to the transaction, and that needs the nft
mutex.

> If I recall correctly that's why I used GFP_ATOMIC here, but I'm not
> sure anymore and I guess you know better.

I'll have a look at original version to see if there was a reason
for this, if so I'll update commit message or move this to its own
change.

> > +		if (src->rules > 0) {
> > +			dst->mt = kvmalloc_array(src->rules, sizeof(*src->mt), GFP_KERNEL);
> 
> Nit: equally readable within 80 columns:
> 
> 			dst->mt = kvmalloc_array(src->rules, sizeof(*src->mt),
> 						 GFP_KERNEL);

OK. I'll reformat.




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux