diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2012-01-17 09:25:38 -0800 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2012-01-17 12:18:35 -0800 |
commit | 5ed4587d170920d7f1836baed6b8553735ebd5cf (patch) | |
tree | d1a03a38f2486899946dedc1f749a42a1659069d /arch | |
parent | 9415cf739bbf3b50397dc71ee5fbc6dba99576d7 (diff) |
CHROMIUM: x86: Fix off-by-one error in do_elf_reloc_fixups()
The use of post-increment with a do-while loop results in
the loop going one step too far when handling relocation fixups.
In about 1/100 cases this would cause it to hang.
BUG=chromium-os:25121
TEST=boot with serial enabled and extra debug to dump
the relocation addresses to ensure that it stops when
getting to the end of the rel.dyn section.
Change-Id: I4d3686d9c90ccfd0df0dd4d8a6483c534c93d3f2
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/14290
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/lib/board.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/lib/board.c b/arch/x86/lib/board.c index 92c7b94a967..0296947cfa5 100644 --- a/arch/x86/lib/board.c +++ b/arch/x86/lib/board.c @@ -255,7 +255,7 @@ static int do_elf_reloc_fixups(void) *addr += gd->reloc_off; } } - } while (re_src++ < re_end); + } while (++re_src < re_end); return 0; } |