[PATCH] kdump proc vmcore size oveflow fix
authorVivek Goyal <vgoyal@in.ibm.com>
Tue, 11 Apr 2006 05:54:10 +0000 (22:54 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:42 +0000 (06:18 -0700)
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>
fs/proc/vmcore.c
include/linux/proc_fs.h

index 7efa73d44c9a5b6f61a7ee3bb4aa02ff885eebb1..20d4b2237fcefd482112a3752669fe87004884bf 100644 (file)
@@ -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)
index 135871df991103b661eb5e78e0c0c30084fc278d..4b47a0253425f9be28430757b1275d72a1245dae 100644 (file)
@@ -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;
 };