Skip to content

Commit af0acf2

Browse files
Chen Aotianummakynes
authored andcommitted
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: 33758c8 ("memcg: enable accounting for nft objects") Signed-off-by: Chen Aotian <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 94623f5 commit af0acf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/nf_tables_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7052,7 +7052,7 @@ static int nf_tables_newobj(struct sk_buff *skb, const struct nfnl_info *info,
70527052
}
70537053

70547054
if (nla[NFTA_OBJ_USERDATA]) {
7055-
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL);
7055+
obj->udata = nla_memdup(nla[NFTA_OBJ_USERDATA], GFP_KERNEL_ACCOUNT);
70567056
if (obj->udata == NULL)
70577057
goto err_userdata;
70587058

0 commit comments

Comments
 (0)