diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-03 20:25:32 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-03 20:25:32 +0300 |
commit | 5b2a0eeea755f54748da805206cc0680acfbb427 (patch) | |
tree | 07cf8d431b955feca390accdd74a80d55837ca89 | |
parent | 74d33293e467df61de1b1d8b2fbe29e550dec33b (diff) | |
parent | fe0d34d242fa1e0dec059e774d146a705420bc9a (diff) | |
download | linux-5b2a0eeea755f54748da805206cc0680acfbb427.tar.xz |
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux
Pull module fix from Rusty Russell:
"Single overzealous locking assertion fix"
* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
module: weaken locking assertion for oops path.
-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); |