Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94116929 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds
Browse files

proc: smaller RCU section in ->getattr()

struct kstat is thread local.

Link: http://lkml.kernel.org/r/20180423213626.GB9043@avx2


Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3cb4e162
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)) {