From: Vivek Goyal A couple of /proc/vmcore data structures overflow with 32bit systems having memory more than 4G. This patch fixes those. Signed-off-by: Ken'ichi Ohmichi Signed-off-by: Vivek Goyal Cc: Signed-off-by: Andrew Morton --- fs/proc/vmcore.c | 4 ++-- include/linux/proc_fs.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff -puN fs/proc/vmcore.c~kdump-proc-vmcore-size-oveflow-fix fs/proc/vmcore.c --- 25/fs/proc/vmcore.c~kdump-proc-vmcore-size-oveflow-fix Mon Apr 3 16:37:08 2006 +++ 25-akpm/fs/proc/vmcore.c Mon Apr 3 16:37:08 2006 @@ -103,8 +103,8 @@ static ssize_t read_vmcore(struct file * size_t buflen, loff_t *fpos) { ssize_t acc = 0, tmp; - size_t tsz, nr_bytes; - u64 start; + size_t tsz; + u64 start, nr_bytes; struct vmcore *curr_m = NULL; if (buflen == 0 || *fpos >= vmcore_size) diff -puN include/linux/proc_fs.h~kdump-proc-vmcore-size-oveflow-fix include/linux/proc_fs.h --- 25/include/linux/proc_fs.h~kdump-proc-vmcore-size-oveflow-fix Mon Apr 3 16:37:08 2006 +++ 25-akpm/include/linux/proc_fs.h Mon Apr 3 16:37:08 2006 @@ -79,7 +79,7 @@ struct kcore_list { struct vmcore { struct list_head list; unsigned long long paddr; - unsigned long size; + unsigned long long size; loff_t offset; }; _