summaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorChen Aotian <chenaotian2@163.com>2023-04-06 06:01:51 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-04-06 11:33:52 +0200
commitaf0acf22aea359e04412237d68787401f96bb583 (patch)
treeaab5028965c49ac73387f467d15f9f6b4b94b1bd /net/netfilter
parentnetfilter: br_netfilter: fix recent physdev match breakage (diff)
downloadlinux-af0acf22aea359e04412237d68787401f96bb583.tar.xz
linux-af0acf22aea359e04412237d68787401f96bb583.zip
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: 33758c891479 ("memcg: enable accounting for nft objects") Signed-off-by: Chen Aotian <chenaotian2@163.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 6004d4b24451..cd52109e674a 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -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;