[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 <ashutosh.naik@gmail.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
349aef0bc4
commit
eb46996f90
@@ -958,7 +958,6 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
|
|||||||
unsigned long ret;
|
unsigned long ret;
|
||||||
const unsigned long *crc;
|
const unsigned long *crc;
|
||||||
|
|
||||||
spin_lock_irq(&modlist_lock);
|
|
||||||
ret = __find_symbol(name, &owner, &crc, mod->license_gplok);
|
ret = __find_symbol(name, &owner, &crc, mod->license_gplok);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/* use_module can fail due to OOM, or module unloading */
|
/* 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))
|
!use_module(mod, owner))
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&modlist_lock);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user