diff options
author | zhouchuangao <zhouchuangao@vivo.com> | 2021-03-30 13:57:50 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2021-04-13 18:52:40 +0200 |
commit | 839157876f97fcc7ead0b62c9377bb50f75a3df9 (patch) | |
tree | a868fbe8113d9eb9f36ac25a44347f2d663b955a /arch/arm64/kernel | |
parent | arm64/sve: Remove redundant system_supports_sve() tests (diff) | |
download | linux-839157876f97fcc7ead0b62c9377bb50f75a3df9.tar.xz linux-839157876f97fcc7ead0b62c9377bb50f75a3df9.zip |
arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.
It can be optimized at compile time.
Signed-off-by: zhouchuangao <zhouchuangao@vivo.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/1617105472-6081-1-git-send-email-zhouchuangao@vivo.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/probes/kprobes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c index 66aac2881ba8..ecf0f613327f 100644 --- a/arch/arm64/kernel/probes/kprobes.c +++ b/arch/arm64/kernel/probes/kprobes.c @@ -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); |