]> git.baikalelectronics.ru Git - kernel.git/commit
rethook: use preempt_{disable, enable}_notrace in rethook_trampoline_handler
authorZe Gao <zegao2021@gmail.com>
Wed, 17 May 2023 03:45:06 +0000 (11:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:32:52 +0000 (17:32 +0100)
commitfeab3a6bf9c13497b4f78fabd11fd522ba3f77e7
treec2b74fc262b3f42ff7914a286fdf686307809369
parenta0a96486cbfb3c3b1ad0fba3ed59f22951b9210c
rethook: use preempt_{disable, enable}_notrace in rethook_trampoline_handler

commit be243bacfb25f5219f2396d787408e8cf1301dd1 upstream.

This patch replaces preempt_{disable, enable} with its corresponding
notrace version in rethook_trampoline_handler so no worries about stack
recursion or overflow introduced by preempt_count_{add, sub} under
fprobe + rethook context.

Link: https://lore.kernel.org/all/20230517034510.15639-2-zegao@tencent.com/
Fixes: 2da3ae3b065e ("rethook: Add a generic return hook")
Signed-off-by: Ze Gao <zegao@tencent.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/rethook.c