All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: "mrubin@google.com" <mrubin@google.com>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"kosaki.motohiro@jp.fujitsu.com" <kosaki.motohiro@jp.fujitsu.com>,
	"nickpiggin@yahoo.com.au" <nickpiggin@yahoo.com.au>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"torvalds@linux-foundation.org" <torvalds@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [2.6.37-rc1] /proc/vmstat failure.
Date: Thu, 4 Nov 2010 01:46:43 +0800	[thread overview]
Message-ID: <20101103174643.GA4985@localhost> (raw)
In-Reply-To: <201011032011.BAB21899.OHVQtFLSFJMFOO@I-love.SAKURA.ne.jp>

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)

  parent reply	other threads:[~2010-11-03 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-31 15:53 [2.6.36-git17] /proc/vmstat failure Tetsuo Handa
2010-11-03 11:11 ` [2.6.37-rc1] " Tetsuo Handa
2010-11-03 17:43   ` Linus Torvalds
2010-11-03 17:46   ` Wu Fengguang [this message]
2010-11-03 17:55     ` Linus Torvalds
2010-11-03 21:54     ` Tetsuo Handa
2010-11-04  2:20       ` Wu Fengguang
2010-11-04  2:52         ` Américo Wang
2010-11-04  2:53           ` Wu Fengguang
2010-11-04  3:31             ` Américo Wang
2010-11-04  3:43               ` Wu Fengguang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101103174643.GA4985@localhost \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.com \
    --cc=nickpiggin@yahoo.com.au \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.