diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-06-01 03:16:17 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-06-01 03:16:17 +0000 |
commit | d8d9b8f76f22b7a16a83e261e64f89ee611f49df (patch) | |
tree | 3067bc130b80d52808e6390c9fc7fc087ec1e33c /fs/proc/mem.c | |
parent | 19c9bba94152148523ba0f7ef7cffe3d45656b11 (diff) |
Initial revision
Diffstat (limited to 'fs/proc/mem.c')
-rw-r--r-- | fs/proc/mem.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fs/proc/mem.c b/fs/proc/mem.c index ccd67566f..97acb5ee8 100644 --- a/fs/proc/mem.c +++ b/fs/proc/mem.c @@ -55,16 +55,10 @@ static struct task_struct * get_task(int pid) struct task_struct * tsk = current; if (pid != tsk->pid) { - int i; - tsk = NULL; - for (i = 1 ; i < NR_TASKS ; i++) - if (task[i] && task[i]->pid == pid) { - tsk = task[i]; - break; - } - /* - * allow accesses only under the same circumstances - * that we would allow ptrace to work + tsk = find_task_by_pid(pid); + + /* Allow accesses only under the same circumstances + * that we would allow ptrace to work. */ if (tsk) { if (!(tsk->flags & PF_PTRACED) @@ -291,10 +285,10 @@ int mem_mmap(struct inode * inode, struct file * file, return -ENOMEM; if (!pte_present(*src_table)) - do_no_page(tsk, src_vma, stmp, 1); + handle_mm_fault(tsk, src_vma, stmp, 1); if ((vma->vm_flags & VM_WRITE) && !pte_write(*src_table)) - do_wp_page(tsk, src_vma, stmp, 1); + handle_mm_fault(tsk, src_vma, stmp, 1); set_pte(src_table, pte_mkdirty(*src_table)); set_pte(dest_table, *src_table); |