]> www.infradead.org Git - users/hch/misc.git/commit
module: Allow __module_address() to be called from RCU section.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 8 Jan 2025 09:04:41 +0000 (10:04 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Mon, 10 Mar 2025 10:54:45 +0000 (11:54 +0100)
commit7d9dda6f628fde3d227a69bec6a82160577b79ca
treed1ad10072b128b028dd597f77c675a47f977a809
parent2bee017741f2890131da2fac96c3f2b64cb947b0
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>
kernel/module/internal.h
kernel/module/main.c