From: Wu Fengguang Date: Wed, 3 Nov 2010 17:56:49 +0000 (+0800) Subject: vmstat: fix offset calculation on void* X-Git-Tag: v2.6.37-rc2~94 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff8b16d7e15a8ba2a6086645614a483e048e3fbf;p=pandora-kernel.git 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: [] strnlen+0x6/0x20 Call Trace: [] ? string+0x39/0xe0 [] ? __wake_up_common+0x4b/0x80 [] ? vsnprintf+0x1ec/0x380 [] ? seq_printf+0x2e/0x60 [] ? vmstat_show+0x26/0x30 [] ? seq_read+0xa6/0x380 [] ? seq_read+0x0/0x380 [] ? proc_reg_read+0x5f/0x90 [] ? vfs_read+0xa1/0x140 [] ? proc_reg_read+0x0/0x90 [] ? sys_read+0x41/0x70 [] ? sysenter_do_call+0x12/0x26 Reported-by: Tetsuo Handa Cc: Michael Rubin Signed-off-by: Wu Fengguang Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed