]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - kernel/module.c
Merge tag 'thermal-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal...
[linux.git] / kernel / module.c
index 052a40212b8e50ff6954fedf0c254c6fca86f559..3a486f8262249b1be38a01461d2329732bde11ab 100644 (file)
@@ -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)