diff options
| author | Ingo Molnar <mingo@kernel.org> | 2015-09-13 10:01:24 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2015-09-13 10:01:24 +0200 |
| commit | c7ef92cea98bc468bbc8e67b6e49d7365dc69482 (patch) | |
| tree | 1ed0118f697d72103eaf8fa53bd373be7a1c91ff /kernel/module.c | |
| parent | locking/qspinlock/x86: Only emit the test-and-set fallback when building gues... (diff) | |
| parent | Linux 4.3-rc1 (diff) | |
| download | linux-c7ef92cea98bc468bbc8e67b6e49d7365dc69482.tar.gz linux-c7ef92cea98bc468bbc8e67b6e49d7365dc69482.zip | |
Merge tag 'v4.3-rc1' into locking/core, to refresh the tree
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index 4d2b82e610e2..b86b7bf1be38 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -602,13 +602,16 @@ const struct kernel_symbol *find_symbol(const char *name, } EXPORT_SYMBOL_GPL(find_symbol); -/* Search for module by name: must hold module_mutex. */ +/* + * Search for module by name: must hold module_mutex (or preempt disabled + * for read-only access). + */ static struct module *find_module_all(const char *name, size_t len, bool even_unformed) { struct module *mod; - module_assert_mutex(); + module_assert_mutex_or_preempt(); list_for_each_entry(mod, &modules, list) { if (!even_unformed && mod->state == MODULE_STATE_UNFORMED) @@ -621,6 +624,7 @@ static struct module *find_module_all(const char *name, size_t len, struct module *find_module(const char *name) { + module_assert_mutex(); return find_module_all(name, strlen(name), false); } EXPORT_SYMBOL_GPL(find_module); |
