Skip to content

Commit

Permalink
percpu: cleanup percpu page upon allocation
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Nov 13, 2023
1 parent 4b44717 commit 20c2265
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/percpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <lib.h>
#include <list.h>
#include <percpu.h>
#include <string.h>

#include <mm/vmm.h>

Expand All @@ -51,6 +52,7 @@ percpu_t *get_percpu_page(unsigned int cpu) {
*/
percpu = get_free_page(GFP_IDENT | GFP_KERNEL | GFP_USER);
BUG_ON(!percpu);
memset(percpu, 0, PAGE_SIZE);

percpu->cpu_id = cpu;

Expand Down

0 comments on commit 20c2265

Please sign in to comment.