Skip to content

Commit 435bbcc

Browse files
Sebastian Andrzej Siewiorpetrpavlu
authored andcommitted
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 <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Pavlu <[email protected]>
1 parent cdd9335 commit 435bbcc

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/module/tracking.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ int try_add_tainted_module(struct module *mod)
2121
{
2222
struct mod_unload_taint *mod_taint;
2323

24-
module_assert_mutex_or_preempt();
25-
2624
if (!mod->taints)
2725
goto out;
2826

0 commit comments

Comments
 (0)