From: Wu Fengguang <fengguang.wu@intel.com>
To: "Shi, Alex" <alex.shi@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Chen, Tim C" <tim.c.chen@intel.com>,
"Li, Shaohua" <shaohua.li@intel.com>,
"pzijlstr@redhat.com" <pzijlstr@redhat.com>
Subject: Re: VM ops on 37-rc1
Date: Thu, 4 Nov 2010 11:00:54 +0800 [thread overview]
Message-ID: <20101104030054.GA18626@localhost> (raw)
In-Reply-To: <1288767341.15466.4624.camel@debian>
This is discuss and fixed in another LKML thread, thanks.
---
commit ff8b16d7e15a8ba2a6086645614a483e048e3fbf
Author: Wu Fengguang <fengguang.wu@intel.com>
Date: Thu Nov 4 01:56:49 2010 +0800
vmstat: fix offset calculation on void*
Fix regression introduced by commit 79da826aee6 ("writeback: report
dirty thresholds in /proc/vmstat").
The incorrect pointer arithmetic can result in problems like this:
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
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Michael Rubin <mrubin@google.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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)
prev parent reply other threads:[~2010-11-04 3:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 6:55 VM ops on 37-rc1 Alex,Shi
2010-11-03 11:43 ` Wu Fengguang
2010-11-04 3:00 ` Wu Fengguang [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=20101104030054.GA18626@localhost \
--to=fengguang.wu@intel.com \
--cc=alex.shi@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pzijlstr@redhat.com \
--cc=shaohua.li@intel.com \
--cc=tim.c.chen@intel.com \
/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.