Re: [PATCH v2] netfilter: nft_hash: bug fixes and resizing

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

 



On Fri, 2014-02-28 at 13:48 +0000, Patrick McHardy wrote:

> +
> +static struct nft_hash_table *nft_hash_tbl_alloc(unsigned int nbuckets)
> +{
> +	struct nft_hash_table *tbl;
> +	size_t size;
> +
> +	size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]);
> +	tbl = kzalloc(size, GFP_KERNEL);
> +	if (tbl == NULL)
> +		tbl = vzalloc(size);

There is no limit on nbuckets ?

You might consider using __GFP_REPEAT | __GFP_NOWARN



--
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