linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] procfs: fix /proc/<pid>/maps heap check
@ 2011-03-01 16:26 Aaro Koskinen
  2011-03-02 12:55 ` Aaro Koskinen
  0 siblings, 1 reply; 5+ messages in thread
From: Aaro Koskinen @ 2011-03-01 16:26 UTC (permalink / raw)
  To: linux-mm, linux-kernel, akpm; +Cc: Aaro Koskinen, stable

The current check looks wrong and prints "[heap]" only if the mapping
matches exactly the heap. However, the heap may be merged with some
other mappings, and there may be also be multiple mappings.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: stable@kernel.org
---
 fs/proc/task_mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 60b9148..f269ee6 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -249,8 +249,8 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
 		const char *name = arch_vma_name(vma);
 		if (!name) {
 			if (mm) {
-				if (vma->vm_start <= mm->start_brk &&
-						vma->vm_end >= mm->brk) {
+				if (vma->vm_start <= mm->brk &&
+						vma->vm_end >= mm->start_brk) {
 					name = "[heap]";
 				} else if (vma->vm_start <= mm->start_stack &&
 					   vma->vm_end >= mm->start_stack) {
-- 
1.5.6.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2011-03-03 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 16:26 [PATCH] procfs: fix /proc/<pid>/maps heap check Aaro Koskinen
2011-03-02 12:55 ` Aaro Koskinen
2011-03-03  1:30   ` KOSAKI Motohiro
2011-03-03 11:37     ` Aaro Koskinen
2011-03-03 12:22       ` Aaro Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).