[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ionw787l.fsf@sejong.aot.lge.com>
Date: Fri, 20 Jun 2014 09:09:18 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Ingo Molnar <mingo@...nel.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -tip v2 3/3] kprobes: Set IPMODIFY flag only if the probe can change regs->ip
On Thu, 19 Jun 2014 21:34:31 +0900, Namhyung Kim wrote:
> What about this?
>
> static int __ftrace_remove_filter_ip(...)
> {
> if (*ref == 1) {
> int ret = unregister_ftrace_function(ops);
> if (ret < 0)
> return ret;
>
> ftrace_set_filter_ip(ops, ip, 1, 0);
> }
>
> (*ref)--;
> return 0;
> }
Hmm.. I missed removing in *ref > 1 case. Here's a v2. :)
static int __ftrace_remove_filter_ip(...)
{
int ret;
if (*ref == 1) {
ret = unregister_ftrace_function(ops);
if (ret < 0)
return ret;
/* ignore failure here */
ftrace_set_filter_ip(ops, ip, 1, 0);
} else
ret = ftrace_set_filter_ip(ops, ip, 1, 0);
if (ret < 0)
return ret;
}
(*ref)--;
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists