aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index ddef482f1334..87ba007b86db 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2539,6 +2539,11 @@ static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf,
2539 rcu_read_unlock(); 2539 rcu_read_unlock();
2540 return -EACCES; 2540 return -EACCES;
2541 } 2541 }
2542 /* Prevent changes to overridden credentials. */
2543 if (current_cred() != current_real_cred()) {
2544 rcu_read_unlock();
2545 return -EBUSY;
2546 }
2542 rcu_read_unlock(); 2547 rcu_read_unlock();
2543 2548
2544 if (count > PAGE_SIZE) 2549 if (count > PAGE_SIZE)