aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 0cb8f20d000c..474eae345068 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1338,8 +1338,8 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
1338 } else { 1338 } else {
1339 inode->i_uid = 0; 1339 inode->i_uid = 0;
1340 inode->i_gid = 0; 1340 inode->i_gid = 0;
1341 inode->i_mode = 0;
1342 } 1341 }
1342 inode->i_mode &= ~(S_ISUID | S_ISGID);
1343 security_task_to_inode(task, inode); 1343 security_task_to_inode(task, inode);
1344 put_task_struct(task); 1344 put_task_struct(task);
1345 return 1; 1345 return 1;
@@ -1390,6 +1390,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
1390 inode->i_uid = 0; 1390 inode->i_uid = 0;
1391 inode->i_gid = 0; 1391 inode->i_gid = 0;
1392 } 1392 }
1393 inode->i_mode &= ~(S_ISUID | S_ISGID);
1393 security_task_to_inode(task, inode); 1394 security_task_to_inode(task, inode);
1394 put_task_struct(task); 1395 put_task_struct(task);
1395 return 1; 1396 return 1;