[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1437036437-25408-7-git-send-email-bhe@redhat.com>
Date: Thu, 16 Jul 2015 16:47:01 +0800
From: Baoquan He <bhe@...hat.com>
To: linux-kernel@...r.kernel.org, ncroxon@...hat.com,
dyoung@...hat.com, mhuang@...hat.com
Cc: Baoquan He <bhe@...hat.com>
Subject: [RHEL6.8 Patch 3/3] vmcore: continue vmcore initialization if PT_NOTE is found empty
Resolves: bz1236437
https://bugzilla.redhat.com/show_bug.cgi?id=1236437
Brew build:
https://brewweb.devel.redhat.com/taskinfo?taskID=9499237
This is back ported from upstream. This commit relies on commit
"vmcore: prevent PT_NOTE p_memsz overflow during header update".
commit c4082f36fa3eeb5d4fadc50241b6e3a388561f80
Author: WANG Chao <chaowang@...hat.com>
Date: Mon Apr 7 15:38:51 2014 -0700
vmcore: continue vmcore initialization if PT_NOTE is found empty
Currently when an empty PT_NOTE is detected, vmcore initialization
fails. It sounds too harsh. Because PT_NOTE could be empty, for
example, one offlined a cpu but never restarted kdump service, and after
crash, PT_NOTE program header is there but no data contains. It's
better to warn about the empty PT_NOTE and continue to initialise
vmcore.
And ultimately the multiple PT_NOTE are merged into a single one, all
empty PT_NOTE are discarded naturally during the merge. So empty
PT_NOTE is not visible to user space and vmcore is as good as expected.
Signed-off-by: WANG Chao <chaowang@...hat.com>
Cc: Vivek Goyal <vgoyal@...hat.com>
Cc: HATAYAMA Daisuke <d.hatayama@...fujitsu.com>
Cc: Greg Pearson <greg.pearson@...com>
Cc: Baoquan He <bhe@...hat.com>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Baoquan He <bhe@...hat.com>
---
fs/proc/vmcore.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 97c950b..ecc7604 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -260,7 +260,6 @@ static int __init merge_note_headers_elf64(char *elfptr, size_t *elfsz,
kfree(notes_section);
if (real_sz == 0) {
pr_warn("Warning: Zero PT_NOTE entries found\n");
- return -EINVAL;
}
}
@@ -347,7 +346,6 @@ static int __init merge_note_headers_elf32(char *elfptr, size_t *elfsz,
kfree(notes_section);
if (real_sz == 0) {
pr_warn("Warning: Zero PT_NOTE entries found\n");
- return -EINVAL;
}
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists