diff options
author | 2008-04-28 02:13:44 -0700 | |
---|---|---|
committer | 2008-04-28 08:58:27 -0700 | |
commit | b901d40c970e6db319fe1f8d84db2b9684b6c9bf (patch) | |
tree | caa02eae1eb20eafca3af9d3bd3524be5ad82c16 /arch/alpha | |
parent | smack: use cap_task_prctl (diff) | |
download | linux-b901d40c970e6db319fe1f8d84db2b9684b6c9bf.tar.gz linux-b901d40c970e6db319fe1f8d84db2b9684b6c9bf.tar.bz2 linux-b901d40c970e6db319fe1f8d84db2b9684b6c9bf.zip |
alpha: handle kcalloc failure
arch/alpha/kernel/module.c (module_frob_arch_sections): Handle kcalloc failure.
Signed-off-by: Jim Meyering <meyering@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r-- | arch/alpha/kernel/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/alpha/kernel/module.c b/arch/alpha/kernel/module.c index 026ba9af6d6a..ebc3c894b5a2 100644 --- 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; |