[PATCH] arm64: Initialise the debug traps earlier

From: Catalin Marinas
Date: Wed Jul 03 2019 - 09:44:23 EST


Commit b5f8b32c93b2 ("kprobes: Initialize kprobes at postcore_initcall")
makes init_kprobes() a postcore_initcall while the arm64 handling of the
BRK instruction is initialised at arch_initcall level. Make the arm64
debug_traps_init() a core_initcall.

Fixes: b5f8b32c93b2 ("kprobes: Initialize kprobes at postcore_initcall")
Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
---
arch/arm64/kernel/debug-monitors.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index f8719bd30850..81770105cd8e 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -382,7 +382,7 @@ static int __init debug_traps_init(void)
TRAP_BRKPT, "ptrace BRK handler");
return 0;
}
-arch_initcall(debug_traps_init);
+core_initcall(debug_traps_init);

/* Re-enable single step for syscall restarting. */
void user_rewind_single_step(struct task_struct *task)