提交 af0acf22 编写于 作者: C Chen Aotian 提交者: Pablo Neira Ayuso

netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT

For memory alloc that store user data from nla[NFTA_OBJ_USERDATA],
use GFP_KERNEL_ACCOUNT is more suitable.

Fixes: 33758c89 ("memcg: enable accounting for nft objects")
Signed-off-by: NChen Aotian <chenaotian2@163.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 94623f57
......@@ -7052,7 +7052,7 @@ static int nf_tables_newobj(struct sk_buff *skb, const struct nfnl_info *info,
}
if (nla[NFTA_OBJ_USERDATA]) {
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL);
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL_ACCOUNT);
if (obj->udata == NULL)
goto err_userdata;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册