diff options
| author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2025-01-08 10:04:41 +0100 |
|---|---|---|
| committer | Petr Pavlu <petr.pavlu@suse.com> | 2025-03-10 11:54:45 +0100 |
| commit | 7d9dda6f628fde3d227a69bec6a82160577b79ca (patch) | |
| tree | d1ad10072b128b028dd597f77c675a47f977a809 /kernel/module/internal.h | |
| parent | 2bee017741f2890131da2fac96c3f2b64cb947b0 (diff) | |
module: Allow __module_address() to be called from RCU section.
mod_find() uses either the modules list to find a module or a tree
lookup (CONFIG_MODULES_TREE_LOOKUP). The list and the tree can both be
iterated under RCU assumption (as well as RCU-sched).
Remove module_assert_mutex_or_preempt() from __module_address() and
entirely since __module_address() is the last user.
Update comments.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250108090457.512198-13-bigeasy@linutronix.de
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Diffstat (limited to 'kernel/module/internal.h')
| -rw-r--r-- | kernel/module/internal.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/kernel/module/internal.h b/kernel/module/internal.h index d09b46ef032f..626cf8668a7e 100644 --- a/kernel/module/internal.h +++ b/kernel/module/internal.h @@ -124,17 +124,6 @@ char *module_next_tag_pair(char *string, unsigned long *secsize); #define for_each_modinfo_entry(entry, info, name) \ for (entry = get_modinfo(info, name); entry; entry = get_next_modinfo(info, name, entry)) -static inline void module_assert_mutex_or_preempt(void) -{ -#ifdef CONFIG_LOCKDEP - if (unlikely(!debug_locks)) - return; - - WARN_ON_ONCE(!rcu_read_lock_sched_held() && - !lockdep_is_held(&module_mutex)); -#endif -} - static inline unsigned long kernel_symbol_value(const struct kernel_symbol *sym) { #ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS |