summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-06-08 03:10:07 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-08 03:34:38 +0300
commit941169298a3e60db694373acbb49cd6569c8398b (patch)
tree9faa9a470f6f1bc3c9fe89e74f0d04030fa3f2cc /fs/proc
parent3cb4e162e4e258d906c07c411283b42b7f20a285 (diff)
downloadlinux-941169298a3e60db694373acbb49cd6569c8398b.tar.xz
proc: smaller RCU section in ->getattr()
struct kstat is thread local. Link: http://lkml.kernel.org/r/20180423213626.GB9043@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3954f50805b8..97af285c63e1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1755,9 +1755,9 @@ int pid_getattr(const struct path *path, struct kstat *stat,
generic_fillattr(inode, stat);
- rcu_read_lock();
stat->uid = GLOBAL_ROOT_UID;
stat->gid = GLOBAL_ROOT_GID;
+ rcu_read_lock();
task = pid_task(proc_pid(inode), PIDTYPE_PID);
if (task) {
if (!has_pid_permissions(pid, task, HIDEPID_INVISIBLE)) {