This allocation does not benefit from contiguous physical memory, and its size depends on userspace input. No reason to stress the buddy allocator and thus the entire system for allocations that can exist in vmalloc'ed memory just fine. Signed-off-by: Daniil Tatianin --- net/netfilter/x_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 5ea95c56f3a0..06a86648b931 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -965,14 +965,14 @@ unsigned int *xt_alloc_entry_offsets(unsigned int size) if (size > XT_MAX_TABLE_SIZE / sizeof(unsigned int)) return NULL; - return kvcalloc(size, sizeof(unsigned int), GFP_KERNEL); + return __vcalloc(size, sizeof(unsigned int), GFP_KERNEL); } EXPORT_SYMBOL(xt_alloc_entry_offsets); void xt_free_entry_offsets(unsigned int *offsets) { - kvfree(offsets); + vfree(offsets); } EXPORT_SYMBOL(xt_free_entry_offsets); -- 2.34.1