Message ID | 172260679559.362040.7360872132937227206.stgit@devnote2 (mailing list archive) |
---|---|
State | Accepted |
Commit | 8c8acb8f26cbde665b233dd1b9bbcbb9b86822dc |
Headers | show |
Series | kprobes: Fix to check symbol prefixes correctly | expand |
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index e85de37d9e1e..da59c68df841 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c @@ -1557,8 +1557,8 @@ static bool is_cfi_preamble_symbol(unsigned long addr) if (lookup_symbol_name(addr, symbuf)) return false; - return str_has_prefix("__cfi_", symbuf) || - str_has_prefix("__pfx_", symbuf); + return str_has_prefix(symbuf, "__cfi_") || + str_has_prefix(symbuf, "__pfx_"); } static int check_kprobe_address_safe(struct kprobe *p,