diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-10-25 22:38:21 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-08 20:57:39 +0300 |
commit | 6ee042fd240fb669f4637f8cd89899b15911e5df (patch) | |
tree | a486cbca9c2fdca3c6c8b898d849426a6f5ad233 /arch/x86/mm | |
parent | f076d081787803b972a9939e477c6456f0c8fd70 (diff) | |
download | linux-6ee042fd240fb669f4637f8cd89899b15911e5df.tar.xz |
x86/mm: Use mm_alloc() in poking_init()
commit 3f4c8211d982099be693be9aa7d6fc4607dff290 upstream.
Instead of duplicating init_mm, allocate a fresh mm. The advantage is
that mm_alloc() has much simpler dependencies. Additionally it makes
more conceptual sense, init_mm has no (and must not have) user state
to duplicate.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20221025201057.816175235@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 2234d1c3f412..dd15fdee4536 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -7,6 +7,7 @@ #include <linux/swapops.h> #include <linux/kmemleak.h> #include <linux/sched/task.h> +#include <linux/sched/mm.h> #include <asm/set_memory.h> #include <asm/cpu_device_id.h> @@ -805,7 +806,7 @@ void __init poking_init(void) spinlock_t *ptl; pte_t *ptep; - poking_mm = copy_init_mm(); + poking_mm = mm_alloc(); BUG_ON(!poking_mm); /* Xen PV guests need the PGD to be pinned. */ |