Message ID | 20200724050553.1724168-5-jarkko.sakkinen@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | arch/x86: kprobes: Remove MODULES dependency | expand |
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c index ada39ddbc922..9e57452b3a51 100644 --- a/arch/x86/kernel/kprobes/core.c +++ b/arch/x86/kernel/kprobes/core.c @@ -423,7 +423,7 @@ void *alloc_insn_page(void) { void *page; - page = module_alloc(PAGE_SIZE); + page = text_alloc(PAGE_SIZE); if (!page) return NULL; @@ -446,7 +446,7 @@ void *alloc_insn_page(void) /* Recover page to RW mode before releasing it */ void free_insn_page(void *page) { - module_memfree(page); + text_free(page); } static int arch_copy_kprobe(struct kprobe *p)
Use text_alloc() and text_free() to implement alloc_insn_page() and free_insn_page(). Cc: linux-mm@kvack.org Cc: Andi Kleen <ak@linux.intel.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>Im --- arch/x86/kernel/kprobes/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)