patch-2.3.99-pre7 linux/kernel/ptrace.c
Next file: linux/kernel/sched.c
Previous file: linux/kernel/ksyms.c
Back to the patch index
Back to the overall index
- Lines: 17
- Date:
Fri May 5 12:22:54 2000
- Orig file:
v2.3.99-pre6/linux/kernel/ptrace.c
- Orig date:
Wed Apr 26 16:34:09 2000
diff -u --recursive --new-file v2.3.99-pre6/linux/kernel/ptrace.c linux/kernel/ptrace.c
@@ -121,10 +121,13 @@
struct vm_area_struct * vma;
/* Worry about races with exit() */
- lock_kernel();
+ task_lock(tsk);
mm = tsk->mm;
- atomic_inc(&mm->mm_users);
- unlock_kernel();
+ if (mm)
+ atomic_inc(&mm->mm_users);
+ task_unlock(tsk);
+ if (!mm)
+ return 0;
down(&mm->mmap_sem);
vma = find_extend_vma(mm, addr);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)