projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
proc: prevent accessing /proc/<PID>/environ until it's ready
[deliverable/linux.git]
/
fs
/
proc
/
base.c
diff --git
a/fs/proc/base.c
b/fs/proc/base.c
index b1755b23893e5e34513582d51d7a9cf9ed6b7227..92e37e224cd22d66d0b9675f1790e110d5e7b415 100644
(file)
--- a/
fs/proc/base.c
+++ b/
fs/proc/base.c
@@
-955,7
+955,8
@@
static ssize_t environ_read(struct file *file, char __user *buf,
struct mm_struct *mm = file->private_data;
unsigned long env_start, env_end;
- if (!mm)
+ /* Ensure the process spawned far enough to have an environment. */
+ if (!mm || !mm->env_end)
return 0;
page = (char *)__get_free_page(GFP_TEMPORARY);
This page took
0.024791 seconds
and
5
git commands to generate.