diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-01-13 02:00:32 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 17:03:16 +0100 |
commit | a2ade7b6ca37c808128810687cd56e8a44443e65 (patch) | |
tree | d7ffb1be14e69f4ba22ca425c21369d4dd3a3032 /fs/proc/task_nommu.c | |
parent | fs/proc/base.c, kernel/latencytop.c: convert sprintf_symbol() to %ps (diff) | |
download | linux-a2ade7b6ca37c808128810687cd56e8a44443e65.tar.xz linux-a2ade7b6ca37c808128810687cd56e8a44443e65.zip |
proc: use unsigned long inside /proc/*/statm
/proc/*/statm code needlessly truncates data from unsigned long to int.
One needs only 8+ TB of RAM to make truncation visible.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r-- | fs/proc/task_nommu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index cb6306e63843..b535d3e5d5f1 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -92,13 +92,14 @@ unsigned long task_vsize(struct mm_struct *mm) return vsize; } -int task_statm(struct mm_struct *mm, int *shared, int *text, - int *data, int *resident) +unsigned long task_statm(struct mm_struct *mm, + unsigned long *shared, unsigned long *text, + unsigned long *data, unsigned long *resident) { struct vm_area_struct *vma; struct vm_region *region; struct rb_node *p; - int size = kobjsize(mm); + unsigned long size = kobjsize(mm); down_read(&mm->mmap_sem); for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) { |