Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156413
b: refs/heads/master
c: 477c4b0
h: refs/heads/master
i:
  156411: b2ee60f
v: v3
  • Loading branch information
Ralf Baechle committed Aug 3, 2009
1 parent ca05948 commit d841cab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e2a9cf96a0af24f33206b4bb98cc3a12242260c1
refs/heads/master: 477c4b07406357ad93d0e32788dbf3ee814eadaa
15 changes: 12 additions & 3 deletions trunk/arch/mips/kernel/vpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,15 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
{
unsigned long insnlo = *location;
Elf32_Addr val, vallo;
struct mips_hi16 *l, *next;

/* Sign extend the addend we extract from the lo insn. */
vallo = ((insnlo & 0xffff) ^ 0x8000) - 0x8000;

if (mips_hi16_list != NULL) {
struct mips_hi16 *l;

l = mips_hi16_list;
while (l != NULL) {
struct mips_hi16 *next;
unsigned long insn;

/*
Expand All @@ -481,7 +480,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
printk(KERN_DEBUG "VPE loader: "
"apply_r_mips_lo16/hi16: \t"
"inconsistent value information\n");
return -ENOEXEC;
goto out_free;
}

/*
Expand Down Expand Up @@ -519,6 +518,16 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location,
*location = insnlo;

return 0;

out_free:
while (l != NULL) {
next = l->next;
kfree(l);
l = next;
}
mips_hi16_list = NULL;

return -ENOEXEC;
}

static int (*reloc_handlers[]) (struct module *me, uint32_t *location,
Expand Down

0 comments on commit d841cab

Please sign in to comment.