Messages in this thread Patch in this message | | | Date | Thu, 4 Nov 2010 01:46:43 +0800 | From | Wu Fengguang <> | Subject | Re: [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)
| |