netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT
authorChen Aotian <chenaotian2@163.com>
Thu, 6 Apr 2023 04:01:51 +0000 (12:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2023 12:28:32 +0000 (14:28 +0200)
commit1c4dbb001fd38828f564584f0c0eca5b39b0ee3c
tree58346abb843036c79623e9539a10552ce2cc489d
parentea854a25c8327f51f7ff529b745794a985185563
netfilter: nf_tables: Modify nla_memdup's flag to GFP_KERNEL_ACCOUNT

[ Upstream commit af0acf22aea359e04412237d68787401f96bb583 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c