diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2006-04-11 09:54:10 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 17:18:42 +0400 |
commit | 80e8ff634169be3fc2ac48f258cc7638e898cd46 (patch) | |
tree | 481b805fedc77b28183ae2be0f114d50d4163bdb | |
parent | 4c416ab71164dc8d3f800a942fb18c4e67f67897 (diff) | |
download | linux-80e8ff634169be3fc2ac48f258cc7638e898cd46.tar.xz |
[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: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/proc/vmcore.c | 4 | ||||
-rw-r--r-- | include/linux/proc_fs.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 7efa73d44c9a..20d4b2237fce 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -103,8 +103,8 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer, 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 --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 135871df9911..4b47a0253425 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -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; }; |