Alexey Dobriyan 3581d458c3 /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 <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-07-17 16:39:54 -07:00
..
2015-06-30 19:44:57 -07:00
2015-06-23 18:02:01 -04:00
2015-06-23 18:01:59 -04:00
2015-07-09 11:42:21 -07:00
2015-06-25 17:00:42 -07:00
2015-07-09 11:42:21 -07:00
2015-06-27 09:47:46 -07:00
2015-04-21 16:16:02 -04:00
2015-07-09 11:42:21 -07:00
2015-07-09 11:42:21 -07:00
2015-04-11 22:29:40 -04:00
2014-11-19 13:01:20 -05:00
2015-06-02 09:22:34 -06:00
2015-07-09 11:42:21 -07:00
2015-05-31 13:23:08 +02:00
2015-06-29 12:07:04 -04:00