x86/mm: Use mm_alloc() in poking_init()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 25 Oct 2022 19:38:21 +0000 (21:38 +0200)
committerDave Hansen <dave.hansen@linux.intel.com>
Thu, 15 Dec 2022 18:37:26 +0000 (10:37 -0800)
commit3f4c8211d982099be693be9aa7d6fc4607dff290
tree73952d2029b3801e0930e16cd5494443d2e3b5b0
parentaf80602799681c78f14fbe20b6185a56020dedee
x86/mm: Use mm_alloc() in poking_init()

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
arch/x86/mm/init.c
include/linux/sched/task.h
kernel/fork.c