Commit 80e8ff63 authored by Vivek Goyal's avatar Vivek Goyal Committed by Linus Torvalds

[PATCH] kdump proc vmcore size oveflow fix

A couple of /proc/vmcore data structures overflow with 32bit systems having
memory more than 4G.  This patch fixes those.
Signed-off-by: default avatarKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: default avatarVivek Goyal <vgoyal@in.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4c416ab7
...@@ -103,8 +103,8 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer, ...@@ -103,8 +103,8 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
size_t buflen, loff_t *fpos) size_t buflen, loff_t *fpos)
{ {
ssize_t acc = 0, tmp; ssize_t acc = 0, tmp;
size_t tsz, nr_bytes; size_t tsz;
u64 start; u64 start, nr_bytes;
struct vmcore *curr_m = NULL; struct vmcore *curr_m = NULL;
if (buflen == 0 || *fpos >= vmcore_size) if (buflen == 0 || *fpos >= vmcore_size)
......
...@@ -79,7 +79,7 @@ struct kcore_list { ...@@ -79,7 +79,7 @@ struct kcore_list {
struct vmcore { struct vmcore {
struct list_head list; struct list_head list;
unsigned long long paddr; unsigned long long paddr;
unsigned long size; unsigned long long size;
loff_t offset; loff_t offset;
}; };
......
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