Skip to content

Commit acef82b

Browse files
congwangtorvalds
authored andcommitted
kcore: fix /proc/kcore's stat.st_size
In 9063c61 ("x86, 64-bit: Clean up user address masking") Linus fixed the wrong size of /proc/kcore problem. But its size still looks insane, since it never equals the size of physical memory. Signed-off-by: WANG Cong <amwang@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Tao Ma <tao.ma@oracle.com> Cc: <mtk.manpages@gmail.com> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9b4d1cb commit acef82b

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎fs/proc/kcore.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,6 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos)
374374
static int __init proc_kcore_init(void)
375375
{
376376
proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations);
377-
if (proc_root_kcore)
378-
proc_root_kcore->size =
379-
(size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
380377
return 0;
381378
}
382379
module_init(proc_kcore_init);

0 commit comments

Comments
 (0)