@@ -365,7 +365,7 @@ static bool nft_ct_tmpl_alloc_pcpu(void)
return true;
for_each_possible_cpu(cpu) {
- tmp = nf_ct_tmpl_alloc(&init_net, &zone, GFP_KERNEL);
+ tmp = nf_ct_tmpl_alloc(&init_net, &zone, GFP_KERNEL_ACCOUNT);
if (!tmp) {
nft_ct_tmpl_put_pcpu();
return false;
@@ -848,7 +848,8 @@ nft_ct_timeout_parse_policy(void *timeouts,
struct nlattr **tb;
int ret = 0;
- tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1);
+ tb = kzalloc_objs(*tb, l4proto->ctnl_timeout.nlattr_max + 1,
+ GFP_KERNEL_ACCOUNT);
if (!tb)
return -ENOMEM;
@@ -934,7 +935,7 @@ static int nft_ct_timeout_obj_init(const struct nft_ctx *ctx,
}
timeout = kzalloc(sizeof(struct nf_ct_timeout) +
- l4proto->ctnl_timeout.obj_size, GFP_KERNEL);
+ l4proto->ctnl_timeout.obj_size, GFP_KERNEL_ACCOUNT);
if (timeout == NULL) {
ret = -ENOMEM;
goto err_proto_put;
@@ -2298,7 +2298,7 @@ static int nft_pipapo_init(const struct nft_set *set,
if (field_count > NFT_PIPAPO_MAX_FIELDS)
return -EINVAL;
- m = kmalloc_flex(*m, f, field_count);
+ m = kmalloc_flex(*m, f, field_count, GFP_KERNEL_ACCOUNT);
if (!m)
return -ENOMEM;
GFP_KERNEL_ACCOUNT is preferred these days for memcg, replace GFP_KERNEL by GFP_KERNEL_ACCOUNT. Just a few leftover in nft_ct and the pipapo set backend. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- net/netfilter/nft_ct.c | 7 ++++--- net/netfilter/nft_set_pipapo.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-)