Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / arch / alpha / kernel / module.c
index aac6d4b..ebc3c89 100644 (file)
@@ -119,8 +119,13 @@ module_frob_arch_sections(Elf64_Ehdr *hdr, Elf64_Shdr *sechdrs,
        }
 
        nsyms = symtab->sh_size / sizeof(Elf64_Sym);
-       chains = kmalloc(nsyms * sizeof(struct got_entry), GFP_KERNEL);
-       memset(chains, 0, nsyms * sizeof(struct got_entry));
+       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;
@@ -285,12 +290,12 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
                reloc_overflow:
                        if (ELF64_ST_TYPE (sym->st_info) == STT_SECTION)
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs section %d\n",
-                                me->name, sym->st_shndx);
+                                "module %s: Relocation (type %lu) overflow vs section %d\n",
+                                me->name, r_type, sym->st_shndx);
                        else
                          printk(KERN_ERR
-                                "module %s: Relocation overflow vs %s\n",
-                                me->name, strtab + sym->st_name);
+                                "module %s: Relocation (type %lu) overflow vs %s\n",
+                                me->name, r_type, strtab + sym->st_name);
                        return -ENOEXEC;
                }
        }