From: Ashutosh Naik Date: Sun, 8 Jan 2006 09:04:37 +0000 (-0800) Subject: [PATCH] kernel/module.c: remove redundant spinlock in resolve_symbol() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb46996f90a0826921f1a0d81535537a9c7f91b0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] kernel/module.c: remove redundant spinlock in resolve_symbol() Remove the redundant spinlock in the function resolve_symbol() as we are not altering the module list, and we already hold the semaphore. Signed-off-by: Ashutosh Naik Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/module.c b/kernel/module.c index f368812ac0e8..e4276046a1b6 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -958,7 +958,6 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, unsigned long ret; const unsigned long *crc; - spin_lock_irq(&modlist_lock); ret = __find_symbol(name, &owner, &crc, mod->license_gplok); if (ret) { /* use_module can fail due to OOM, or module unloading */ @@ -966,7 +965,6 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, !use_module(mod, owner)) ret = 0; } - spin_unlock_irq(&modlist_lock); return ret; }