diff options
author | James Morris <jmorris@namei.org> | 2009-06-11 03:03:14 +0200 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-06-11 03:03:14 +0200 |
commit | 73fbad283cfbbcf02939bdbda31fc4a30e729cca (patch) | |
tree | 7c89fe13e1b4a2c7f2d60f4ea6eaf69c14bccab7 /fs/proc | |
parent | Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
parent | nommu: Provide mmap_min_addr definition. (diff) | |
download | linux-73fbad283cfbbcf02939bdbda31fc4a30e729cca.tar.xz linux-73fbad283cfbbcf02939bdbda31fc4a30e729cca.zip |
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: |