Commit e240b0fd authored by Sven Schnelle's avatar Sven Schnelle Committed by Peter Zijlstra

uprobes: Use kzalloc to allocate xol area

To prevent unitialized members, use kzalloc to allocate
the xol area.

Fixes: b059a453 ("x86/vdso: Add mremap hook to vm_special_mapping")
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20240903102313.3402529-1-svens@linux.ibm.com
parent 25dfc9e3
...@@ -1489,7 +1489,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr) ...@@ -1489,7 +1489,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
struct xol_area *area; struct xol_area *area;
void *insns; void *insns;
area = kmalloc(sizeof(*area), GFP_KERNEL); area = kzalloc(sizeof(*area), GFP_KERNEL);
if (unlikely(!area)) if (unlikely(!area))
goto out; goto out;
...@@ -1499,7 +1499,6 @@ static struct xol_area *__create_xol_area(unsigned long vaddr) ...@@ -1499,7 +1499,6 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
goto free_area; goto free_area;
area->xol_mapping.name = "[uprobes]"; area->xol_mapping.name = "[uprobes]";
area->xol_mapping.fault = NULL;
area->xol_mapping.pages = area->pages; area->xol_mapping.pages = area->pages;
area->pages[0] = alloc_page(GFP_HIGHUSER); area->pages[0] = alloc_page(GFP_HIGHUSER);
if (!area->pages[0]) if (!area->pages[0])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment