From 98fa0a1ad2ea0001e03df0c6afb2db87ed14c4ec Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 2 Feb 2023 11:17:34 +0100 Subject: [PATCH] wifi: don't use kzalloc directly Avoid using wrong pointer when calling free_page() which causes otherwise memory corruption. --- repos/pc/src/lib/wifi/lx_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index 499d7a9d75..ff54e1b507 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -326,7 +326,7 @@ void kfree_sensitive(const void *p) unsigned long get_zeroed_page(gfp_t gfp_mask) { - return (unsigned long)kzalloc(PAGE_SIZE, gfp_mask | __GFP_ZERO); + return (unsigned long)__alloc_pages(GFP_KERNEL, 0, 0, NULL)->virtual; }