mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] not adding modules range to kcore if it's equal to vmcore range
@ 2014-07-13  0:42 Baoquan He
  2014-07-13  1:05 ` [PATCH v2] " Baoquan He
  0 siblings, 1 reply; 5+ messages in thread
From: Baoquan He @ 2014-07-13  0:42 UTC (permalink / raw)
  To: linux-kernel, akpm, qiuxishi, paul.gortmaker; +Cc: Baoquan He

On some ARCHs modules range is eauql to vmalloc range. E.g on i686

This will cause 2 duplicate program segments in /proc/kcore, makes
user confused. In this patch a judgment added to check if modules
range is equal to vmalloc range. If yes, just skip adding the modules
range.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 fs/proc/kcore.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 39e6ef3..bf5127c 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -610,8 +610,10 @@ static void __init proc_kcore_text_init(void)
 struct kcore_list kcore_modules;
 static void __init add_modules_range(void)
 {
-	kclist_add(&kcore_modules, (void *)MODULES_VADDR,
-			MODULES_END - MODULES_VADDR, KCORE_VMALLOC);
+	if (MODULES_VADDR != VMALLOC_START) {
+		kclist_add(&kcore_modules, (void *)MODULES_VADDR,
+				MODULES_END - MODULES_VADDR, KCORE_VMALLOC);
+	}
 }
 #else
 static void __init add_modules_range(void)
-- 
1.9.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-07-31  8:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-13  0:42 [PATCH] not adding modules range to kcore if it's equal to vmcore range Baoquan He
2014-07-13  1:05 ` [PATCH v2] " Baoquan He
2014-07-15 22:16   ` Andrew Morton
2014-07-15 23:48     ` Baoquan He
2014-07-31  8:50     ` Baoquan He

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®