diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-05 12:27:16 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-12-05 12:27:16 -0800 |
commit | 0f137416247fe92c0779a9ab49e912a7006869e8 (patch) | |
tree | d2b5b4961aaa68918fe8ad73d38c2f108938337a /kernel | |
parent | 25cfb0c7de3f14e283a43dcd6de903657f9f98c7 (diff) | |
parent | 5d603311615f612320bb77bd2a82553ef1ced5b7 (diff) | |
download | linux-0f137416247fe92c0779a9ab49e912a7006869e8.tar.bz2 |
Merge tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux
Pull modules updates from Jessica Yu:
"Summary of modules changes for the 5.5 merge window:
- Refactor include/linux/export.h and remove code duplication between
EXPORT_SYMBOL and EXPORT_SYMBOL_NS to make it more readable.
The most notable change is that no namespace is represented by an
empty string "" rather than NULL.
- Fix a module load/unload race where waiter(s) trying to load the
same module weren't being woken up when a module finally goes away"
* tag 'modules-for-v5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
kernel/module.c: wakeup processes in module_wq on module unload
moduleparam: fix parameter description mismatch
export: avoid code duplication in include/linux/export.h
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index 052a40212b8e..3a486f826224 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -1033,6 +1033,8 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user, strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); free_module(mod); + /* someone could wait for the module in add_unformed_module() */ + wake_up_all(&module_wq); return 0; out: mutex_unlock(&module_mutex); @@ -1400,7 +1402,7 @@ static int verify_namespace_is_imported(const struct load_info *info, char *imported_namespace; namespace = kernel_symbol_namespace(sym); - if (namespace) { + if (namespace && namespace[0]) { imported_namespace = get_modinfo(info, "import_ns"); while (imported_namespace) { if (strcmp(namespace, imported_namespace) == 0) |