diff options
author | James Morris <jmorris@namei.org> | 2009-06-11 11:03:14 +1000 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-11 11:03:14 +1000 |
commit | 73fbad283cfbbcf02939bdbda31fc4a30e729cca (patch) | |
tree | 7c89fe13e1b4a2c7f2d60f4ea6eaf69c14bccab7 /fs/proc | |
parent | 769f3e8c384795cc350e2aae27de2a12374d19d4 (diff) | |
parent | 35f2c2f6f6ae13ef23c4f68e6d3073753077ca43 (diff) | |
download | linux-73fbad283cfbbcf02939bdbda31fc4a30e729cca.tar.bz2 |
Merge branch 'next' into for-linus
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 3326bbf9ab95..1539e630c47d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -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: |