projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cb4e16
)
proc: smaller RCU section in ->getattr()
author
Alexey Dobriyan
<
[email protected]
>
Fri, 8 Jun 2018 00:10:07 +0000
(17:10 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 8 Jun 2018 00:34:38 +0000
(17:34 -0700)
struct kstat is thread local.
Link:
http://lkml.kernel.org/r/20180423213626.GB9043@avx2
Signed-off-by: Alexey Dobriyan <
[email protected]
>
Reviewed-by: Andrew Morton <
[email protected]
>
Cc: Al Viro <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/proc/base.c
patch
|
blob
|
history
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index 3954f50805b8ae2b6e0254615d24344cf6d27dc8..97af285c63e152b13334e9fb40ad4966e6ec08c7 100644
(file)
--- 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)) {