diff --git a/fs/proc/base.c b/fs/proc/base.c index 87782e874b6af4523adff3e7e721046d5f857ee0..aa50d1ac28fc6189a9489d1b679fcf86115e633c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -243,6 +243,11 @@ static ssize_t proc_pid_cmdline_read(struct file *file, char __user *buf, len1 = arg_end - arg_start; len2 = env_end - env_start; + /* Empty ARGV. */ + if (len1 == 0) { + rv = 0; + goto out_free_page; + } /* * Inherently racy -- command line shares address space * with code and data.