Commit 83915787 authored by zhouchuangao's avatar zhouchuangao Committed by Catalin Marinas

arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

It can be optimized at compile time.
Signed-off-by: default avatarzhouchuangao <zhouchuangao@vivo.com>
Reviewed-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/1617105472-6081-1-git-send-email-zhouchuangao@vivo.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent ef9c5d09
......@@ -264,8 +264,7 @@ int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
* normal page fault.
*/
instruction_pointer_set(regs, (unsigned long) cur->addr);
if (!instruction_pointer(regs))
BUG();
BUG_ON(!instruction_pointer(regs));
if (kcb->kprobe_status == KPROBE_REENTER)
restore_previous_kprobe(kcb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment