File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -320,14 +320,13 @@ static bool ftrace_find_callable_addr(struct dyn_ftrace *rec,
320
320
* dealing with an out-of-range condition, we can assume it
321
321
* is due to a module being loaded far away from the kernel.
322
322
*
323
- * NOTE: __module_text_address() must be called with preemption
324
- * disabled , but we can rely on ftrace_lock to ensure that 'mod'
323
+ * NOTE: __module_text_address() must be called within a RCU read
324
+ * section , but we can rely on ftrace_lock to ensure that 'mod'
325
325
* retains its validity throughout the remainder of this code.
326
326
*/
327
327
if (!mod ) {
328
- preempt_disable ();
328
+ guard ( rcu ) ();
329
329
mod = __module_text_address (pc );
330
- preempt_enable ();
331
330
}
332
331
333
332
if (WARN_ON (!mod ))
You can’t perform that action at this time.
0 commit comments