]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
module: use list_for_each_entry_rcu() on find_module_all()
authorLuis R. Rodriguez <mcgrof@kernel.org>
Fri, 26 May 2017 21:12:25 +0000 (14:12 -0700)
committerJessica Yu <jeyu@kernel.org>
Tue, 27 Jun 2017 17:35:52 +0000 (19:35 +0200)
The module list has been using RCU in a lot of other calls
for a while now, we just overlooked changing this one over to
use RCU.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c

index f546d574f4361c34512b4be995333f7b9953357f..afc6ede7bcdf31021f750a4f272a1121e23b9125 100644 (file)
@@ -603,7 +603,7 @@ static struct module *find_module_all(const char *name, size_t len,
 
        module_assert_mutex_or_preempt();
 
-       list_for_each_entry(mod, &modules, list) {
+       list_for_each_entry_rcu(mod, &modules, list) {
                if (!even_unformed && mod->state == MODULE_STATE_UNFORMED)
                        continue;
                if (strlen(mod->name) == len && !memcmp(mod->name, name, len))