diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:14:05 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 19:14:05 -0800 |
| commit | 6f267f9cc2ea3c375b3e70e336f4feb7da365fe3 (patch) | |
| tree | e60c68517c38a58abc8af02e76d332e8dae332a8 /fs/proc/base.c | |
| parent | 7b4d3039dfd2cbfa15127c29dcb557f314d13db1 (diff) | |
v2.4.6.9 -> v2.4.7
- me: fix ptrace and /proc issues with new core-dump permissions
- numerous: IDE tape driver update for completion handlers
- Ben Collins: ieee1394 GUID cleanups
- Jacek Stepniewski: nasty deadlock in rename()
Diffstat (limited to 'fs/proc/base.c')
| -rw-r--r-- | fs/proc/base.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 969b91d8981e..edae3acee910 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -645,6 +645,20 @@ static int proc_base_readdir(struct file * filp, /* building an inode */ +static int task_dumpable(struct task_struct *task) +{ + int dumpable = 0; + struct mm_struct *mm; + + task_lock(task); + mm = task->mm; + if (mm) + dumpable = mm->dumpable; + task_unlock(task); + return dumpable; +} + + static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *task, int ino) { struct inode * inode; @@ -670,7 +684,7 @@ static struct inode *proc_pid_make_inode(struct super_block * sb, struct task_st inode->u.proc_i.task = task; inode->i_uid = 0; inode->i_gid = 0; - if (ino == PROC_PID_INO || task->mm->dumpable) { + if (ino == PROC_PID_INO || task_dumpable(task)) { inode->i_uid = task->euid; inode->i_gid = task->egid; } |
