From: Sebastian Andrzej Siewior Date: Wed, 8 Jan 2025 09:04:38 +0000 (+0100) Subject: module: Remove module_assert_mutex_or_preempt() from try_add_tainted_module(). X-Git-Tag: v6.15-rc1~94^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=435bbcc3bef602ce3920382f339d3cd65e46ad23;p=thirdparty%2Flinux.git module: Remove module_assert_mutex_or_preempt() from try_add_tainted_module(). module_assert_mutex_or_preempt() is not needed in try_add_tainted_module(). 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(). Signed-off-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20250108090457.512198-10-bigeasy@linutronix.de Signed-off-by: Petr Pavlu --- diff --git a/kernel/module/tracking.c b/kernel/module/tracking.c index 16742d1c630c6..4fefec5b683c6 100644 --- a/kernel/module/tracking.c +++ b/kernel/module/tracking.c @@ -21,8 +21,6 @@ int try_add_tainted_module(struct module *mod) { struct mod_unload_taint *mod_taint; - module_assert_mutex_or_preempt(); - if (!mod->taints) goto out;