diff options
author | Alexey Dobriyan <[email protected]> | 2015-07-17 16:24:09 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-07-17 16:39:54 -0700 |
commit | 3581d458c39bc5e58ceeeaf51796625bc978d2eb (patch) | |
tree | 4a996d189d715782dc31a2c7ad7e12de32b7de77 /lib/timerqueue.c | |
parent | c9d120b0b2b5069cb2ae62f8eac0cef31c8544be (diff) |
/proc/$PID/cmdline: fixup empty ARGV case
/proc/*/cmdline code checks if it should look at ENVP area by checking
last byte of ARGV area:
rv = access_remote_vm(mm, arg_end - 1, &c, 1, 0);
if (rv <= 0)
goto out_free_page;
If ARGV is somehow made empty (by doing execve(..., NULL, ...) or
manually setting ->arg_start and ->arg_end to equal values), the decision
will be based on byte which doesn't even belong to ARGV/ENVP.
So, quickly check if ARGV area is empty and report 0 to match previous
behaviour.
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions