From f89f10bbe99fcb87646f20ad3345401ee0a67f65 Mon Sep 17 00:00:00 2001 From: "Neil P. Murphy" Date: Mon, 19 Oct 2015 01:34:54 -0400 Subject: [PATCH] xt_ACCOUNT: call free_pages(x,2) Below is the patch with the *rest* of the free_page(X) calls changed to free_pages(X, 2). xt_ACCOUNT should always allocate memory in page pairs. And always *free* memory in page pairs. References: http://www.spinics.net/lists/netfilter-devel/msg39025.html --- extensions/ACCOUNT/xt_ACCOUNT.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/ACCOUNT/xt_ACCOUNT.c b/extensions/ACCOUNT/xt_ACCOUNT.c index 85e73ed..200fdb3 100644 --- a/extensions/ACCOUNT/xt_ACCOUNT.c +++ b/extensions/ACCOUNT/xt_ACCOUNT.c @@ -141,7 +141,7 @@ static void ipt_acc_data_free(void *data, uint8_t depth) unsigned int b; for (b = 0; b <= 255; b++) { if (mask_16->mask_24[b]) { - free_page((unsigned long)mask_16->mask_24[b]); + free_pages((unsigned long)mask_16->mask_24[b], 2); } } free_pages((unsigned long)data, 2); @@ -158,10 +158,10 @@ static void ipt_acc_data_free(void *data, uint8_t depth) for (b = 0; b <= 255; b++) { if (mask_16->mask_24[b]) { - free_page((unsigned long)mask_16->mask_24[b]); + free_pages((unsigned long)mask_16->mask_24[b], 2); } } - free_page((unsigned long)mask_16); + free_pages((unsigned long)mask_16, 2); } } free_pages((unsigned long)data, 2);