]> www.infradead.org Git - users/hch/misc.git/commit
module: Use RCU in find_symbol().
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 8 Jan 2025 09:04:39 +0000 (10:04 +0100)
committerPetr Pavlu <petr.pavlu@suse.com>
Mon, 10 Mar 2025 10:54:44 +0000 (11:54 +0100)
commit2ff49f8931be8bed53e65993fd1af68e3cd747cb
tree421019b12fb15c4a0d7bfd922bd887cc185b624e
parent435bbcc3bef602ce3920382f339d3cd65e46ad23
module: Use RCU in find_symbol().

module_assert_mutex_or_preempt() is not needed in find_symbol(). The
function checks for RCU-sched or the module_mutex to be acquired. The
list_for_each_entry_rcu() below does the same check.

Remove module_assert_mutex_or_preempt() from try_add_tainted_module().
Use RCU protection to invoke find_symbol() and update callers.

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-11-bigeasy@linutronix.de
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
kernel/module/main.c
kernel/module/version.c