diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-10 09:07:25 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-10 09:07:25 -0700 |
| commit | f70d6318320983a8d2fac28cfe8d22dfd5e52a73 (patch) | |
| tree | e3a427a3abeca491007f036b09be84944657f58e /kernel/module.c | |
| parent | b963e7223cb3278dda35a6550a8df08ff2be2ee5 (diff) | |
| parent | f7644cbfcdf03528f0f450f3940c4985b2291f49 (diff) | |
Merge 4.2-rc6 into staging-next
We want the IIO and staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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); |
