Commit 4099b98
ftrace: Fix softlockup in ftrace_module_enable
A soft lockup was observed when loading amdgpu module.
If a module has a lot of tracable functions, multiple calls
to kallsyms_lookup can spend too much time in RCU critical
section and with disabled preemption, causing kernel panic.
This is the same issue that was fixed in
commit d0b24b4 ("ftrace: Prevent RCU stall on PREEMPT_VOLUNTARY
kernels") and commit 42ea22e ("ftrace: Add cond_resched() to
ftrace_graph_set_hash()").
Fix it the same way by adding cond_resched() in ftrace_module_enable.
Link: https://lore.kernel.org/aMQD9_lxYmphT-up@vova-pc
Signed-off-by: Vladimir Riabchun <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 70bd70c commit 4099b98
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7535 | 7535 | | |
7536 | 7536 | | |
7537 | 7537 | | |
| 7538 | + | |
| 7539 | + | |
7538 | 7540 | | |
7539 | 7541 | | |
7540 | 7542 | | |
| |||
0 commit comments