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-Tag: v2.6.16-rc1~718 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb46996f90a0826921f1a0d81535537a9c7f91b0;p=linux-2.6 [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 f368812ac0..e4276046a1 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; }