Skip to content
Commit d7b5da4f authored by Vasily Averin's avatar Vasily Averin Committed by Greg Kroah-Hartman
Browse files

netfilter: nf_tables: memcg accounting for dynamically allocated objects



[ Upstream commit 42193ffd ]

nft_*.c files whose NFT_EXPR_STATEFUL flag is set on need to
use __GFP_ACCOUNT flag for objects that are dynamically
allocated from the packet path.

Such objects are allocated inside nft_expr_ops->init() callbacks
executed in task context while processing netlink messages.

In addition, this patch adds accounting to nft_set_elem_expr_clone()
used for the same purposes.

Signed-off-by: default avatarVasily Averin <vvs@openvz.org>
Acked-by: default avatarRoman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Stable-dep-of: 91a139ce ("netfilter: nft_limit: do not ignore unsupported flags")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3bb4403d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment