Thread (112 messages) 112 messages, 9 authors, 2016-05-29
STALE3673d

[PATCH kexec-tools 02/32] kdump: fix multiple program header entries

From: Russell King <hidden>
Date: 2016-05-03 10:21:13
Also in: kexec
Subsystem: the rest · Maintainer: Linus Torvalds

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.

Signed-off-by: Russell King <redacted>
---
 kdump/kdump.c | 1 +
 1 file changed, 1 insertion(+)
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;
 	}
 	
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help