Commit 1d6c1c0b authored by Prasanna Meda's avatar Prasanna Meda Committed by Linus Torvalds

[PATCH] proc_kcore: Correct double accounting of elf_buflen

Correct double accounting of elf_buflen in read_kcore:get_kcore_size().
Signed-off-by: default avatarPrasanna Meda <pmeda@akamai.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b90c1799
......@@ -264,8 +264,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
unsigned long start;
read_lock(&kclist_lock);
tsz = get_kcore_size(&nphdr, &elf_buflen);
proc_root_kcore->size = size = tsz + elf_buflen;
proc_root_kcore->size = size = get_kcore_size(&nphdr, &elf_buflen);
if (buflen == 0 || *fpos >= size) {
read_unlock(&kclist_lock);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment