This adds CONFIG_FTRACE_RECORD_RECURSION that will record to a file "recursed_functions" all the functions that caused recursion while a callback to the function tracer was running. Link: https://lkml.kernel.org/r/20201106023548.102375687@goodmis.org
Showing the changes to kernel/livepatch/patch.c (1 of 17 files). Show all
Unified · Split
| @@ -49,7 +49,7 @@ static void notrace klp_ftrace_handler(unsigned long ip, · 48 unmodified lines | |||
| 49 | 49 | ||
| 50 | ops = container_of(fops, struct klp_ops, fops); | 50 | ops = container_of(fops, struct klp_ops, fops); |
| 51 | 51 | ||
| 52 | bit = ftrace_test_recursion_trylock(); | 52 | bit = ftrace_test_recursion_trylock(ip, parent_ip); |
| 53 | if (WARN_ON_ONCE(bit < 0)) | 53 | if (WARN_ON_ONCE(bit < 0)) |
| 54 | return; | 54 | return; |
| 55 | /* | 55 | /* |