diff options
Diffstat (limited to 'fs/proc')
| -rw-r--r-- | fs/proc/array.c | 7 | ||||
| -rw-r--r-- | fs/proc/inode.c | 6 | ||||
| -rw-r--r-- | fs/proc/kmsg.c | 2 | ||||
| -rw-r--r-- | fs/proc/proc_sysctl.c | 4 | ||||
| -rw-r--r-- | fs/proc/task_mmu.c | 19 |
5 files changed, 23 insertions, 15 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 79375fc115d2..d67a72dcb92c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -430,8 +430,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
| 430 | * safe because the task has stopped executing permanently. | 430 | * safe because the task has stopped executing permanently. |
| 431 | */ | 431 | */ |
| 432 | if (permitted && (task->flags & PF_DUMPCORE)) { | 432 | if (permitted && (task->flags & PF_DUMPCORE)) { |
| 433 | eip = KSTK_EIP(task); | 433 | if (try_get_task_stack(task)) { |
| 434 | esp = KSTK_ESP(task); | 434 | eip = KSTK_EIP(task); |
| 435 | esp = KSTK_ESP(task); | ||
| 436 | put_task_stack(task); | ||
| 437 | } | ||
| 435 | } | 438 | } |
| 436 | } | 439 | } |
| 437 | 440 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index dd0f82622427..8dacaabb9f37 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
| @@ -234,11 +234,11 @@ static ssize_t proc_reg_write(struct file *file, const char __user *buf, size_t | |||
| 234 | return rv; | 234 | return rv; |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | static unsigned int proc_reg_poll(struct file *file, struct poll_table_struct *pts) | 237 | static __poll_t proc_reg_poll(struct file *file, struct poll_table_struct *pts) |
| 238 | { | 238 | { |
| 239 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 239 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
| 240 | unsigned int rv = DEFAULT_POLLMASK; | 240 | __poll_t rv = DEFAULT_POLLMASK; |
| 241 | unsigned int (*poll)(struct file *, struct poll_table_struct *); | 241 | __poll_t (*poll)(struct file *, struct poll_table_struct *); |
| 242 | if (use_pde(pde)) { | 242 | if (use_pde(pde)) { |
| 243 | poll = pde->proc_fops->poll; | 243 | poll = pde->proc_fops->poll; |
| 244 | if (poll) | 244 | if (poll) |
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index e0f8774acd65..f0bfb45c3f9f 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c | |||
| @@ -40,7 +40,7 @@ static ssize_t kmsg_read(struct file *file, char __user *buf, | |||
| 40 | return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_PROC); | 40 | return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_PROC); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | static unsigned int kmsg_poll(struct file *file, poll_table *wait) | 43 | static __poll_t kmsg_poll(struct file *file, poll_table *wait) |
| 44 | { | 44 | { |
| 45 | poll_wait(file, &log_wait, wait); | 45 | poll_wait(file, &log_wait, wait); |
| 46 | if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC)) | 46 | if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_PROC)) |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index c5cbbdff3c3d..63325377621a 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
| @@ -630,12 +630,12 @@ static int proc_sys_open(struct inode *inode, struct file *filp) | |||
| 630 | return 0; | 630 | return 0; |
| 631 | } | 631 | } |
| 632 | 632 | ||
| 633 | static unsigned int proc_sys_poll(struct file *filp, poll_table *wait) | 633 | static __poll_t proc_sys_poll(struct file *filp, poll_table *wait) |
| 634 | { | 634 | { |
| 635 | struct inode *inode = file_inode(filp); | 635 | struct inode *inode = file_inode(filp); |
| 636 | struct ctl_table_header *head = grab_header(inode); | 636 | struct ctl_table_header *head = grab_header(inode); |
| 637 | struct ctl_table *table = PROC_I(inode)->sysctl_entry; | 637 | struct ctl_table *table = PROC_I(inode)->sysctl_entry; |
| 638 | unsigned int ret = DEFAULT_POLLMASK; | 638 | __poll_t ret = DEFAULT_POLLMASK; |
| 639 | unsigned long event; | 639 | unsigned long event; |
| 640 | 640 | ||
| 641 | /* sysctl was unregistered */ | 641 | /* sysctl was unregistered */ |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 339e4c1c044d..ec6d2983a5cb 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
| @@ -47,8 +47,11 @@ void task_mem(struct seq_file *m, struct mm_struct *mm) | |||
| 47 | if (hiwater_rss < mm->hiwater_rss) | 47 | if (hiwater_rss < mm->hiwater_rss) |
| 48 | hiwater_rss = mm->hiwater_rss; | 48 | hiwater_rss = mm->hiwater_rss; |
| 49 | 49 | ||
| 50 | text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10; | 50 | /* split executable areas between text and lib */ |
| 51 | lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text; | 51 | text = PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK); |
| 52 | text = min(text, mm->exec_vm << PAGE_SHIFT); | ||
| 53 | lib = (mm->exec_vm << PAGE_SHIFT) - text; | ||
| 54 | |||
| 52 | swap = get_mm_counter(mm, MM_SWAPENTS); | 55 | swap = get_mm_counter(mm, MM_SWAPENTS); |
| 53 | seq_printf(m, | 56 | seq_printf(m, |
| 54 | "VmPeak:\t%8lu kB\n" | 57 | "VmPeak:\t%8lu kB\n" |
| @@ -76,7 +79,9 @@ void task_mem(struct seq_file *m, struct mm_struct *mm) | |||
| 76 | file << (PAGE_SHIFT-10), | 79 | file << (PAGE_SHIFT-10), |
| 77 | shmem << (PAGE_SHIFT-10), | 80 | shmem << (PAGE_SHIFT-10), |
| 78 | mm->data_vm << (PAGE_SHIFT-10), | 81 | mm->data_vm << (PAGE_SHIFT-10), |
| 79 | mm->stack_vm << (PAGE_SHIFT-10), text, lib, | 82 | mm->stack_vm << (PAGE_SHIFT-10), |
| 83 | text >> 10, | ||
| 84 | lib >> 10, | ||
| 80 | mm_pgtables_bytes(mm) >> 10, | 85 | mm_pgtables_bytes(mm) >> 10, |
| 81 | swap << (PAGE_SHIFT-10)); | 86 | swap << (PAGE_SHIFT-10)); |
| 82 | hugetlb_report_usage(m, mm); | 87 | hugetlb_report_usage(m, mm); |
| @@ -977,14 +982,14 @@ static inline void clear_soft_dirty(struct vm_area_struct *vma, | |||
| 977 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, | 982 | static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, |
| 978 | unsigned long addr, pmd_t *pmdp) | 983 | unsigned long addr, pmd_t *pmdp) |
| 979 | { | 984 | { |
| 980 | pmd_t pmd = *pmdp; | 985 | pmd_t old, pmd = *pmdp; |
| 981 | 986 | ||
| 982 | if (pmd_present(pmd)) { | 987 | if (pmd_present(pmd)) { |
| 983 | /* See comment in change_huge_pmd() */ | 988 | /* See comment in change_huge_pmd() */ |
| 984 | pmdp_invalidate(vma, addr, pmdp); | 989 | old = pmdp_invalidate(vma, addr, pmdp); |
| 985 | if (pmd_dirty(*pmdp)) | 990 | if (pmd_dirty(old)) |
| 986 | pmd = pmd_mkdirty(pmd); | 991 | pmd = pmd_mkdirty(pmd); |
| 987 | if (pmd_young(*pmdp)) | 992 | if (pmd_young(old)) |
| 988 | pmd = pmd_mkyoung(pmd); | 993 | pmd = pmd_mkyoung(pmd); |
| 989 | 994 | ||
| 990 | pmd = pmd_wrprotect(pmd); | 995 | pmd = pmd_wrprotect(pmd); |
