summaryrefslogtreecommitdiff
path: root/kernel/module.c
diff options
context:
space:
mode:
authorSrinivasarao P <spathi@codeaurora.org>2019-08-07 11:09:26 +0530
committerSrinivasarao P <spathi@codeaurora.org>2019-08-07 11:10:24 +0530
commit7b0c4ab61ef1dc4eaa00ee0d9b4c50ca0193ad75 (patch)
tree397dd18af48f396145bf68538cc1e333748f87d6 /kernel/module.c
parent27f8e158ab4abb61edd03ce70561bc5c67c3e623 (diff)
parent886d08593458ade141937c7839fa206ab32f4c5c (diff)
Merge android-4.4.188 (886d085) into msm-4.4
* refs/heads/tmp-886d085 Linux 4.4.188 xen/swiotlb: fix condition for calling xen_destroy_contiguous_region() s390/dasd: fix endless loop after read unit address configuration selinux: fix memory leak in policydb_init() x86/kvm: Don't call kvm_spurious_fault() from .fixup ipc/mqueue.c: only perform resource calculation if user valid uapi linux/coda_psdev.h: move upc_req definition from uapi to kernel side headers coda: fix build using bare-metal toolchain coda: add error handling for fget mm/cma.c: fail if fixed declaration can't be honored x86: math-emu: Hide clang warnings for 16-bit overflow x86/apic: Silence -Wtype-limits compiler warnings be2net: Signal that the device cannot transmit during reconfiguration ACPI: fix false-positive -Wuninitialized warning scsi: zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized ceph: fix improper use of smp_mb__before_atomic() btrfs: fix minimum number of chunk errors for DUP fs/adfs: super: fix use-after-free bug dmaengine: rcar-dmac: Reject zero-length slave DMA requests MIPS: lantiq: Fix bitfield masking kernel/module.c: Only return -EEXIST for modules that have finished loading ARM: dts: rockchip: Mark that the rk3288 timer might stop in suspend ARM: riscpc: fix DMA Change-Id: I5117beda77a1297c46e7b105bd70d1d726dd6d2b Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 57809d2b4271..ad4928210e28 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3231,8 +3231,7 @@ static bool finished_loading(const char *name)
sched_annotate_sleep();
mutex_lock(&module_mutex);
mod = find_module_all(name, strlen(name), true);
- ret = !mod || mod->state == MODULE_STATE_LIVE
- || mod->state == MODULE_STATE_GOING;
+ ret = !mod || mod->state == MODULE_STATE_LIVE;
mutex_unlock(&module_mutex);
return ret;
@@ -3391,8 +3390,7 @@ again:
mutex_lock(&module_mutex);
old = find_module_all(mod->name, strlen(mod->name), true);
if (old != NULL) {
- if (old->state == MODULE_STATE_COMING
- || old->state == MODULE_STATE_UNFORMED) {
+ if (old->state != MODULE_STATE_LIVE) {
/* Wait in case it fails to load. */
mutex_unlock(&module_mutex);
err = wait_event_interruptible(module_wq,