From: Hugh Dickins The sixth "data" field of /proc/$pid/statm was sometimes negative: text is a subset of shared_vm, and so was subtracted twice from total_vm. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton --- 25-akpm/fs/proc/task_mmu.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/proc/task_mmu.c~statm-fix-negative-data fs/proc/task_mmu.c --- 25/fs/proc/task_mmu.c~statm-fix-negative-data 2004-10-24 23:13:45.660020808 -0700 +++ 25-akpm/fs/proc/task_mmu.c 2004-10-24 23:13:45.664020200 -0700 @@ -40,7 +40,7 @@ int task_statm(struct mm_struct *mm, int *shared = mm->rss - mm->anon_rss; *text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> PAGE_SHIFT; - *data = mm->total_vm - mm->shared_vm - *text; + *data = mm->total_vm - mm->shared_vm; *resident = mm->rss; return mm->total_vm; } _