diff --git a/[refs] b/[refs] index 604f2900c14b..b65dc1afe787 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e751e992f3fb08ba35e1ca8095ec8fbf9eda523 +refs/heads/master: 107db7c7dd137aeb7361b8c2606ac936c0be58ff diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index fb45615943c2..23342e188a66 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/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: