summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 6e6712b3aaf5..1e7dcbe527af 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3397,8 +3397,7 @@ static bool finished_loading(const char *name)
3397 sched_annotate_sleep(); 3397 sched_annotate_sleep();
3398 mutex_lock(&module_mutex); 3398 mutex_lock(&module_mutex);
3399 mod = find_module_all(name, strlen(name), true); 3399 mod = find_module_all(name, strlen(name), true);
3400 ret = !mod || mod->state == MODULE_STATE_LIVE 3400 ret = !mod || mod->state == MODULE_STATE_LIVE;
3401 || mod->state == MODULE_STATE_GOING;
3402 mutex_unlock(&module_mutex); 3401 mutex_unlock(&module_mutex);
3403 3402
3404 return ret; 3403 return ret;
@@ -3588,8 +3587,7 @@ again:
3588 mutex_lock(&module_mutex); 3587 mutex_lock(&module_mutex);
3589 old = find_module_all(mod->name, strlen(mod->name), true); 3588 old = find_module_all(mod->name, strlen(mod->name), true);
3590 if (old != NULL) { 3589 if (old != NULL) {
3591 if (old->state == MODULE_STATE_COMING 3590 if (old->state != MODULE_STATE_LIVE) {
3592 || old->state == MODULE_STATE_UNFORMED) {
3593 /* Wait in case it fails to load. */ 3591 /* Wait in case it fails to load. */
3594 mutex_unlock(&module_mutex); 3592 mutex_unlock(&module_mutex);
3595 err = wait_event_interruptible(module_wq, 3593 err = wait_event_interruptible(module_wq,