lkml.org 
[lkml]   [2010]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [2.6.37-rc1] /proc/vmstat failure.
On Wed, Nov 03, 2010 at 07:11:11PM +0800, Tetsuo Handa wrote:
> Hello.
>
> "cat /proc/vmstat" triggered below failure.
>
> BUG: unable to handle kernel paging request at 07c06d16
> IP: [<c050c336>] strnlen+0x6/0x20

It seems that m->private is of type (void *) while the original v is
(unsigned long *). Can be fixed by the following patch.

Thanks,
Fengguang
---
diff --git a/mm/vmstat.c b/mm/vmstat.c
index cd2e42b..42eac4d 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -949,7 +949,7 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
v[PGPGIN] /= 2; /* sectors -> kbytes */
v[PGPGOUT] /= 2;
#endif
- return m->private + *pos;
+ return (unsigned long *)m->private + *pos;
}

static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)

\
 
 \ /
  Last update: 2010-11-03 18:49    [W:0.094 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site