Memory allocated with the ZERO_FLAG will now be zeroed before being returned to the caller. Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> --- lib/alloc_page.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/alloc_page.c b/lib/alloc_page.c index d850b6a..8c79202 100644 --- a/lib/alloc_page.c +++ b/lib/alloc_page.c @@ -372,6 +372,8 @@ static void *page_memalign_order_flags(u8 ord, u8 al, u32 flags) if (area & BIT(i)) res = page_memalign_order(areas + i, ord, al); spin_unlock(&lock); + if (res && (flags & FLAG_ZERO)) + memset(res, 0, BIT(ord) * PAGE_SIZE); return res; } -- 2.26.2