diff options
author | Russell King <rmk@arm.linux.org.uk> | 2016-06-06 17:58:52 +0100 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2016-06-08 09:15:08 +0900 |
commit | 5a5ef3b9b71cd107754c80f05ca898f5e7c2822f (patch) | |
tree | 4c27e716236b07f14ccd0c45434645d8501aacc9 | |
parent | bab7cb1ce778bb37cd9791133458adb5f00ddf0b (diff) |
kdump: fix multiple program header entries
generate_new_headers() forgot to increment the program header pointer
after adding each program header from the kexec template. Fix it to
increment it correctly.
Without this, the program headers contain only the last entry, which
means we will be missing most of the kernel image in the dump.
Reviewed-by: Pratyush Anand <panand@redhat.com>
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kdump/kdump.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kdump/kdump.c b/kdump/kdump.c index 3247a54..99a1789 100644 --- a/kdump/kdump.c +++ b/kdump/kdump.c @@ -192,6 +192,7 @@ static void *generate_new_headers( } memcpy(nphdr, &phdr[i], sizeof(*nphdr)); nphdr->p_offset = offset; + nphdr++; offset += phdr[i].p_filesz; } |