mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	"mrubin@google.com" <mrubin@google.com>,
	"david@fromorbit.com" <david@fromorbit.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"nickpiggin@yahoo.com.au" <nickpiggin@yahoo.com.au>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vmstat: fix offset calculation on void*
Date: Tue,  9 Nov 2010 12:24:49 +0900 (JST)	[thread overview]
Message-ID: <20101109122527.BC57.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20101103175648.GA6398@localhost>

> Fix regression introduced by commit 79da826aee6.
> 
> 	BUG: unable to handle kernel paging request at 07c06d16
> 	IP: [<c050c336>] strnlen+0x6/0x20
> 
> 	Call Trace:
> 	 [<c050a249>] ? string+0x39/0xe0
> 	 [<c042be6b>] ? __wake_up_common+0x4b/0x80
> 	 [<c050afcc>] ? vsnprintf+0x1ec/0x380
> 	 [<c04b380e>] ? seq_printf+0x2e/0x60
> 	 [<c04829a6>] ? vmstat_show+0x26/0x30
> 	 [<c04b3bb6>] ? seq_read+0xa6/0x380
> 	 [<c04b3b10>] ? seq_read+0x0/0x380
> 	 [<c04d5d2f>] ? proc_reg_read+0x5f/0x90
> 	 [<c049c4a1>] ? vfs_read+0xa1/0x140
> 	 [<c04d5cd0>] ? proc_reg_read+0x0/0x90
> 	 [<c049c981>] ? sys_read+0x41/0x70
> 	 [<c0402bd0>] ? sysenter_do_call+0x12/0x26
> 
> 
> CC: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> CC: Michael Rubin <mrubin@google.com>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
> 
> Hopefully Tetsuo can test it soon, thanks!
> 
>  mm/vmstat.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-2.6.orig/mm/vmstat.c	2010-11-04 01:49:12.000000000 +0800
> +++ linux-2.6/mm/vmstat.c	2010-11-04 01:49:23.000000000 +0800
> @@ -949,7 +949,7 @@ static void *vmstat_start(struct seq_fil
>  	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)

Good catch!
	Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>






      reply	other threads:[~2010-11-09  3:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 17:56 Wu Fengguang
2010-11-09  3:24 ` KOSAKI Motohiro [this message]

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=20101109122527.BC57.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=david@fromorbit.com \
    --cc=fengguang.wu@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®