mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT
[ Upstream commitaf0acf22ae
] For memory alloc that store user data from nla[NFTA_OBJ_USERDATA], use GFP_KERNEL_ACCOUNT is more suitable. Fixes:33758c8914
("memcg: enable accounting for nft objects") Signed-off-by: Chen Aotian <chenaotian2@163.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ea854a25c8
commit
1c4dbb001f
1 changed files with 1 additions and 1 deletions
|
@ -6980,7 +6980,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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue