projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1236cc3
)
alpha: handle kcalloc failure
author
Jim Meyering
<
[email protected]
>
Mon, 28 Apr 2008 09:13:44 +0000
(
02:13
-0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 28 Apr 2008 15:58:27 +0000
(08:58 -0700)
arch/alpha/kernel/module.c (module_frob_arch_sections): Handle kcalloc failure.
Signed-off-by: Jim Meyering <
[email protected]
>
Cc: Richard Henderson <
[email protected]
>
Cc: Ivan Kokshaysky <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/alpha/kernel/module.c
patch
|
blob
|
history
diff --git
a/arch/alpha/kernel/module.c
b/arch/alpha/kernel/module.c
index 026ba9af6d6ae3e70a9ea71f6af4c014620176c7..ebc3c894b5a2cc0d5a871e0e30ac99249d599bd7 100644
(file)
--- a/
arch/alpha/kernel/module.c
+++ b/
arch/alpha/kernel/module.c
@@
-120,6
+120,12
@@
module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
nsyms = symtab->sh_size / sizeof(Elf64_Sym);
chains = kcalloc(nsyms, sizeof(struct got_entry), GFP_KERNEL);
+ if (!chains) {
+ printk(KERN_ERR
+ "module %s: no memory for symbol chain buffer\n",
+ me->name);
+ return -ENOMEM;
+ }
got->sh_size = 0;
got->sh_addralign = 8;