Messages in this thread | | | Date | Thu, 16 Apr 2020 22:42:50 +0900 | From | Masami Hiramatsu <> | Subject | Re: [PATCH] kretprobe: Prevent triggering kretprobe from within kprobe_flush_task |
| |
Hi Jiri,
On Thu, 16 Apr 2020 11:13:20 +0200 Jiri Olsa <jolsa@redhat.com> wrote:
> On Thu, Apr 16, 2020 at 10:55:06AM +0900, Masami Hiramatsu wrote: > > SNIP > > > > trampoline_handler > > > kretprobe_hash_lock(current, &head, &flags); <--- deadlock > > > > > > Adding kprobe_busy_begin/end helpers that mark code with fake > > > probe installed to prevent triggering of another kprobe within > > > this code. > > > > > > Using these helpers in kprobe_flush_task, so the probe recursion > > > protection check is hit and the probe is never set to prevent > > > above lockup. > > > > > > Reported-by: "Ziqian SUN (Zamir)" <zsun@redhat.com> > > > Signed-off-by: Jiri Olsa <jolsa@kernel.org> > > > > Thanks Jiri and Ziqian! > > > > Looks good to me. > > > > Acked-by: Masami Hiramatsu <mhiramat@kernel.org> > > > > BTW, this is a kind of bugfix. So should it add a Fixes tag? > > > > Fixes: ef53d9c5e4da ('kprobes: improve kretprobe scalability with hashed locking') > > Cc: stable@vger.kernel.org > > ah right, do you want me to repost with those?
Yeah, if you don't mind.
Thank you,
> > thanks, > jirka >
-- Masami Hiramatsu <mhiramat@kernel.org>
| |