summaryrefslogtreecommitdiff
path: root/fs/proc/task_mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/task_mmu.c')
-rw-r--r--fs/proc/task_mmu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index 095aa7c80ee1..0b7f73653ae3 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -348,7 +348,8 @@ static int show_map(struct seq_file *m, void *v)
struct vm_area_struct *pad_vma = get_pad_vma(v);
struct vm_area_struct *vma = get_data_vma(v);
- show_map_vma(m, vma);
+ if (vma_pages(vma))
+ show_map_vma(m, vma);
show_map_pad_vma(vma, pad_vma, m, show_map_vma);
@@ -851,6 +852,9 @@ static int show_smap(struct seq_file *m, void *v)
memset(&mss, 0, sizeof(mss));
+ if (!vma_pages(vma))
+ goto show_pad;
+
smap_gather_stats(vma, &mss, 0);
show_map_vma(m, vma);
@@ -869,6 +873,7 @@ static int show_smap(struct seq_file *m, void *v)
seq_printf(m, "ProtectionKey: %8u\n", vma_pkey(vma));
show_smap_vma_flags(m, vma);
+show_pad:
show_map_pad_vma(vma, pad_vma, m, (show_pad_vma_fn)show_smap);
return 0;