Skip to content

Commit

Permalink
MIPS: Module: Make error messages unique.
Browse files Browse the repository at this point in the history
There were three different errors resulting in a "dangerous relocation"
message.  Add the relocation type to the messgages to make them more
useful.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Aug 3, 2009
1 parent 39b3d44 commit 6f9fdeb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/mips/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v)
static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
{
if (v % 4) {
printk(KERN_ERR "module %s: dangerous relocation\n", me->name);
pr_err("module %s: dangerous R_MIPS_26 REL relocation\n",
me->name);
return -ENOEXEC;
}

Expand All @@ -118,7 +119,8 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v)
{
if (v % 4) {
printk(KERN_ERR "module %s: dangerous relocation\n", me->name);
pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n",
me->name);
return -ENOEXEC;
}

Expand Down Expand Up @@ -222,7 +224,7 @@ static int apply_r_mips_lo16_rel(struct module *me, u32 *location, Elf_Addr v)
return 0;

out_danger:
printk(KERN_ERR "module %s: dangerous " "relocation\n", me->name);
pr_err("module %s: dangerous R_MIPS_LO16 REL relocation\n", me->name);

return -ENOEXEC;
}
Expand Down

0 comments on commit 6f9fdeb

Please sign in to comment.