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:
58c501a
)
proc: do mmput ASAP for /proc/*/map_files
author
Alexey Dobriyan
<
[email protected]
>
Tue, 10 Apr 2018 23:32:05 +0000
(16:32 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 11 Apr 2018 17:28:34 +0000
(10:28 -0700)
mm_struct is not needed while printing as all the data was already
extracted.
Link:
http://lkml.kernel.org/r/20180309223120.GC3843@avx2
Signed-off-by: Alexey Dobriyan <
[email protected]
>
Reviewed-by: Andrew Morton <
[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 d413a138dc30f000fce7505fe723c902620ee010..eafa39a3a88cb479eaca9d164e05cc4dbca1db70 100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-2211,6
+2211,7
@@
proc_map_files_readdir(struct file *file, struct dir_context *ctx)
}
}
up_read(&mm->mmap_sem);
+ mmput(mm);
for (i = 0; i < nr_files; i++) {
char buf[4 * sizeof(long) + 2]; /* max: %lx-%lx\0 */
@@
-2228,7
+2229,6
@@
proc_map_files_readdir(struct file *file, struct dir_context *ctx)
}
if (fa)
flex_array_free(fa);
- mmput(mm);
out_put_task:
put_task_struct(task);