Skip to content

Commit

Permalink
[PATCH] kernel/module.c: remove redundant spinlock in resolve_symbol()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ashutosh Naik authored and Linus Torvalds committed Jan 9, 2006
1 parent 349aef0 commit eb46996
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,15 +958,13 @@ 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 */
if (!check_version(sechdrs, versindex, name, mod, crc) ||
!use_module(mod, owner))
ret = 0;
}
spin_unlock_irq(&modlist_lock);
return ret;
}

Expand Down

0 comments on commit eb46996

Please sign in to comment.