Re: [RFC PATCH -tip 0/5] kprobes: Abolish jprobe APIs
From: Steven Rostedt
Date: Mon Oct 09 2017 - 14:11:30 EST
On Mon, 9 Oct 2017 09:33:50 -0600
Jonathan Corbet <corbet@xxxxxxx> wrote:
> > will prevent the callback from being called again. But this wrapper
> > adds some overhead, and if the callback is safe from recursion,
> > it can set this flag to disable the ftrace protection.
>
> What happens if you mark a function safe and it recurses anyway? Say, if
> somebody else has hooked a different function unknown to the current
> caller?
Oh, if another callback is attached to a function that gets called
within this function, that is fine. In fact I do that all the time. The
problem is if the callback gets called again and then goes into a
recursive loop.
-- Steve