aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2005-06-25 17:57:55 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:48 -0400
commit50cccc699ed849d31c9e3f7643db33edade20e4e (patch)
tree7cd6e1adfa7b42a7be2815361e5d41c2fd89ee48
parentdc009d92435f99498cbc579ce76bf28e837e2c14 (diff)
[PATCH] Kexec on panic vmlinux initrd fix
This is a minor bug fix in kexec to resolve the problem of loading panic kernel with initrd. o Problem: Loading a capture kenrel fails if initrd is also being loaded. This has been observed for vmlinux image for kexec on panic case. o This patch fixes the problem. In segment location and size verification logic, minor correction has been done. Segment memory end (mend) should be mstart + memsz - 1. This one byte offset was source of failure for initrd loading which was being loaded at hole boundary. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--kernel/kexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index def9c73ec9a6..a0411b3bd54a 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -264,7 +264,7 @@ static int kimage_crash_alloc(struct kimage **rimage, unsigned long entry,
264 for (i = 0; i < nr_segments; i++) { 264 for (i = 0; i < nr_segments; i++) {
265 unsigned long mstart, mend; 265 unsigned long mstart, mend;
266 mstart = image->segment[i].mem; 266 mstart = image->segment[i].mem;
267 mend = mstart + image->segment[i].memsz; 267 mend = mstart + image->segment[i].memsz - 1;
268 /* Ensure we are within the crash kernel limits */ 268 /* Ensure we are within the crash kernel limits */
269 if ((mstart < crashk_res.start) || (mend > crashk_res.end)) 269 if ((mstart < crashk_res.start) || (mend > crashk_res.end))
270 goto out; 270 goto out;