lkml.org 
[lkml]   [2021]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] kretprobe: avoid re-registration of the same kretprobe earlier
On Fri, 29 Jan 2021 15:23:47 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:

> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index f7fb5d135930fa..63a36f33565354 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -1530,6 +1530,7 @@ static inline int check_kprobe_rereg(struct kprobe *p)
> ret = -EINVAL;
> mutex_unlock(&kprobe_mutex);
>
> + WARN_ON(ret);
> return ret;
> }

Please use WARN_ON_ONCE(ret);

Thanks,

-- Steve

\
 
 \ /
  Last update: 2021-01-29 17:32    [W:0.065 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site