[Devel] [PATCH 06/13] netfilter/x_tables: account entry offsets allocations
Alexander Mikhalitsyn
alexander.mikhalitsyn at virtuozzo.com
Tue May 18 20:54:20 MSK 2021
From: Andrey Ryabinin <aryabinin at virtuozzo.com>
Entry offsets may consume a lot of kernel memory. So let's account
them.
https://jira.sw.ru/browse/PSBM-54407
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
(cherry picked from commit 56c0d7d5cc4b97e913061f6cf6109adbba547c94)
VZ 8 rebase part https://jira.sw.ru/browse/PSBM-127783
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
---
net/netfilter/x_tables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 9ff9d4b83d0f..38584a504a29 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -983,7 +983,7 @@ unsigned int *xt_alloc_entry_offsets(unsigned int size)
if (size > XT_MAX_TABLE_SIZE / sizeof(unsigned int))
return NULL;
- return kvmalloc_array(size, sizeof(unsigned int), GFP_KERNEL | __GFP_ZERO);
+ return kvmalloc_array(size, sizeof(unsigned int), GFP_KERNEL_ACCOUNT | __GFP_ZERO);
}
EXPORT_SYMBOL(xt_alloc_entry_offsets);
--
2.28.0
More information about the Devel
mailing list