From: Amerigo Wang Date: Tue, 22 Sep 2009 23:45:35 +0000 (-0700) Subject: kcore: fix /proc/kcore's stat.st_size X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=acef82b873b6899d80e639317228f2104dae79a2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git kcore: fix /proc/kcore's stat.st_size In 9063c61fd5cbd ("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 Cc: "Eric W. Biederman" Cc: Tao Ma Cc: Acked-by: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index f06f45b42181..0cf8a24cf6c3 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -374,9 +374,6 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) static int __init proc_kcore_init(void) { proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations); - if (proc_root_kcore) - proc_root_kcore->size = - (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE; return 0; } module_init(proc_kcore_init);