Skip to content

Commit e240b0f

Browse files
svens-s390Peter Zijlstra
authored andcommitted
uprobes: Use kzalloc to allocate xol area
To prevent unitialized members, use kzalloc to allocate the xol area. Fixes: b059a45 ("x86/vdso: Add mremap hook to vm_special_mapping") Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Oleg Nesterov <oleg@redhat.com> Link: https://lore.kernel.org/r/20240903102313.3402529-1-svens@linux.ibm.com
1 parent 25dfc9e commit e240b0f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/events/uprobes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,7 +1489,7 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
14891489
struct xol_area *area;
14901490
void *insns;
14911491

1492-
area = kmalloc(sizeof(*area), GFP_KERNEL);
1492+
area = kzalloc(sizeof(*area), GFP_KERNEL);
14931493
if (unlikely(!area))
14941494
goto out;
14951495

@@ -1499,7 +1499,6 @@ static struct xol_area *__create_xol_area(unsigned long vaddr)
14991499
goto free_area;
15001500

15011501
area->xol_mapping.name = "[uprobes]";
1502-
area->xol_mapping.fault = NULL;
15031502
area->xol_mapping.pages = area->pages;
15041503
area->pages[0] = alloc_page(GFP_HIGHUSER);
15051504
if (!area->pages[0])

0 commit comments

Comments
 (0)