aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-08 14:31:16 -0400
commit3f17ea6dea8ba5668873afa54628a91aaa3fb1c0 (patch)
treeafbeb2accd4c2199ddd705ae943995b143a0af02 /fs/proc
parent1860e379875dfe7271c649058aeddffe5afd9d0d (diff)
parent1a5700bc2d10cd379a795fd2bb377a190af5acd4 (diff)
Merge branch 'next' (accumulated 3.16 merge window patches) into master
Now that 3.15 is released, this merges the 'next' branch into 'master', bringing us to the normal situation where my 'master' branch is the merge window. * accumulated work in next: (6809 commits) ufs: sb mutex merge + mutex_destroy powerpc: update comments for generic idle conversion cris: update comments for generic idle conversion idle: remove cpu_idle() forward declarations nbd: zero from and len fields in NBD_CMD_DISCONNECT. mm: convert some level-less printks to pr_* MAINTAINERS: adi-buildroot-devel is moderated MAINTAINERS: add linux-api for review of API/ABI changes mm/kmemleak-test.c: use pr_fmt for logging fs/dlm/debug_fs.c: replace seq_printf by seq_puts fs/dlm/lockspace.c: convert simple_str to kstr fs/dlm/config.c: convert simple_str to kstr mm: mark remap_file_pages() syscall as deprecated mm: memcontrol: remove unnecessary memcg argument from soft limit functions mm: memcontrol: clean up memcg zoneinfo lookup mm/memblock.c: call kmemleak directly from memblock_(alloc|free) mm/mempool.c: update the kmemleak stack trace for mempool allocations lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations mm: introduce kmemleak_update_trace() mm/kmemleak.c: use %u to print ->checksum ...
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/task_mmu.c28
-rw-r--r--fs/proc/vmcore.c2
2 files changed, 20 insertions, 10 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index c4b2646b6d7c..cfa63ee92c96 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -300,6 +300,12 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
300 goto done; 300 goto done;
301 } 301 }
302 302
303 if (vma->vm_ops && vma->vm_ops->name) {
304 name = vma->vm_ops->name(vma);
305 if (name)
306 goto done;
307 }
308
303 name = arch_vma_name(vma); 309 name = arch_vma_name(vma);
304 if (!name) { 310 if (!name) {
305 pid_t tid; 311 pid_t tid;
@@ -737,9 +743,6 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma,
737 ptent = pte_file_clear_soft_dirty(ptent); 743 ptent = pte_file_clear_soft_dirty(ptent);
738 } 744 }
739 745
740 if (vma->vm_flags & VM_SOFTDIRTY)
741 vma->vm_flags &= ~VM_SOFTDIRTY;
742
743 set_pte_at(vma->vm_mm, addr, pte, ptent); 746 set_pte_at(vma->vm_mm, addr, pte, ptent);
744#endif 747#endif
745} 748}
@@ -807,8 +810,9 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
807 810
808 if (type == CLEAR_REFS_SOFT_DIRTY) { 811 if (type == CLEAR_REFS_SOFT_DIRTY) {
809 soft_dirty_cleared = true; 812 soft_dirty_cleared = true;
810 pr_warn_once("The pagemap bits 55-60 has changed their meaning! " 813 pr_warn_once("The pagemap bits 55-60 has changed their meaning!"
811 "See the linux/Documentation/vm/pagemap.txt for details.\n"); 814 " See the linux/Documentation/vm/pagemap.txt for "
815 "details.\n");
812 } 816 }
813 817
814 task = get_proc_task(file_inode(file)); 818 task = get_proc_task(file_inode(file));
@@ -839,11 +843,17 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
839 * 843 *
840 * Writing 3 to /proc/pid/clear_refs only affects file 844 * Writing 3 to /proc/pid/clear_refs only affects file
841 * mapped pages. 845 * mapped pages.
846 *
847 * Writing 4 to /proc/pid/clear_refs affects all pages.
842 */ 848 */
843 if (type == CLEAR_REFS_ANON && vma->vm_file) 849 if (type == CLEAR_REFS_ANON && vma->vm_file)
844 continue; 850 continue;
845 if (type == CLEAR_REFS_MAPPED && !vma->vm_file) 851 if (type == CLEAR_REFS_MAPPED && !vma->vm_file)
846 continue; 852 continue;
853 if (type == CLEAR_REFS_SOFT_DIRTY) {
854 if (vma->vm_flags & VM_SOFTDIRTY)
855 vma->vm_flags &= ~VM_SOFTDIRTY;
856 }
847 walk_page_range(vma->vm_start, vma->vm_end, 857 walk_page_range(vma->vm_start, vma->vm_end,
848 &clear_refs_walk); 858 &clear_refs_walk);
849 } 859 }
@@ -1408,10 +1418,10 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
1408 seq_printf(m, "%08lx %s", vma->vm_start, buffer); 1418 seq_printf(m, "%08lx %s", vma->vm_start, buffer);
1409 1419
1410 if (file) { 1420 if (file) {
1411 seq_printf(m, " file="); 1421 seq_puts(m, " file=");
1412 seq_path(m, &file->f_path, "\n\t= "); 1422 seq_path(m, &file->f_path, "\n\t= ");
1413 } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { 1423 } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
1414 seq_printf(m, " heap"); 1424 seq_puts(m, " heap");
1415 } else { 1425 } else {
1416 pid_t tid = vm_is_stack(task, vma, is_pid); 1426 pid_t tid = vm_is_stack(task, vma, is_pid);
1417 if (tid != 0) { 1427 if (tid != 0) {
@@ -1421,14 +1431,14 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid)
1421 */ 1431 */
1422 if (!is_pid || (vma->vm_start <= mm->start_stack && 1432 if (!is_pid || (vma->vm_start <= mm->start_stack &&
1423 vma->vm_end >= mm->start_stack)) 1433 vma->vm_end >= mm->start_stack))
1424 seq_printf(m, " stack"); 1434 seq_puts(m, " stack");
1425 else 1435 else
1426 seq_printf(m, " stack:%d", tid); 1436 seq_printf(m, " stack:%d", tid);
1427 } 1437 }
1428 } 1438 }
1429 1439
1430 if (is_vm_hugetlb_page(vma)) 1440 if (is_vm_hugetlb_page(vma))
1431 seq_printf(m, " huge"); 1441 seq_puts(m, " huge");
1432 1442
1433 walk_page_range(vma->vm_start, vma->vm_end, &walk); 1443 walk_page_range(vma->vm_start, vma->vm_end, &walk);
1434 1444
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 6a8e785b29da..382aa890e228 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -42,7 +42,7 @@ static size_t elfnotes_sz;
42/* Total size of vmcore file. */ 42/* Total size of vmcore file. */
43static u64 vmcore_size; 43static u64 vmcore_size;
44 44
45static struct proc_dir_entry *proc_vmcore = NULL; 45static struct proc_dir_entry *proc_vmcore;
46 46
47/* 47/*
48 * Returns > 0 for RAM pages, 0 for non-RAM pages, < 0 on error 48 * Returns > 0 for RAM pages, 0 for non-RAM pages, < 0 on error