Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146423
b: refs/heads/master
c: 107db7c
h: refs/heads/master
i:
  146421: d107fcf
  146419: 0b0b813
  146415: 7c5f48e
v: v3
  • Loading branch information
David Howells authored and James Morris committed May 10, 2009
1 parent 7478e9f commit d49f0b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e751e992f3fb08ba35e1ca8095ec8fbf9eda523
refs/heads/master: 107db7c7dd137aeb7361b8c2606ac936c0be58ff
6 changes: 6 additions & 0 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2128,9 +2128,15 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
if (copy_from_user(page, buf, count))
goto out_free;

/* Guard against adverse ptrace interaction */
length = mutex_lock_interruptible(&task->cred_guard_mutex);
if (length < 0)
goto out_free;

length = security_setprocattr(task,
(char*)file->f_path.dentry->d_name.name,
(void*)page, count);
mutex_unlock(&task->cred_guard_mutex);
out_free:
free_page((unsigned long) page);
out:
Expand Down

0 comments on commit d49f0b1

Please sign in to comment.