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 10:20:52 +0800 [thread overview]
Message-ID: <20101104022052.GA7800@localhost> (raw)
In-Reply-To: <201011040654.GDB05271.SOFJFFtOMLHOQV@I-love.SAKURA.ne.jp>
On Thu, Nov 04, 2010 at 05:54:48AM +0800, Tetsuo Handa wrote:
> Wu Fengguang wrote:
> > 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.
>
> Fixed by this patch. Thank you.
Great, thanks!
> By the way, GCC treats "(void *) + offset" as "(char *) + offset"
> but it is GCC specific extention. Maybe we should avoid such usage
> in order to avoid build failure for other compilers.
"(void *) + offset" seems to be used quite often.
I tried enable this gcc option, only to see huge amount of warnings.
-Wpointer-arith
Warn about anything that depends on the "size of" a
function type or of "void". GNU C assigns these types a
size of 1, for convenience in calculations with "void *"
pointers and pointers to functions.
/cc/linux-next/scripts/mod/file2alias.c: In function ‘device_id_check’:
/cc/linux-next/scripts/mod/file2alias.c:88: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:88: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:88: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:94: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:94: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:94: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c: In function ‘do_usb_table’:
/cc/linux-next/scripts/mod/file2alias.c:275: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c: In function ‘do_table’:
/cc/linux-next/scripts/mod/file2alias.c:870: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c: In function ‘handle_moddevtable’:
/cc/linux-next/scripts/mod/file2alias.c:897: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/file2alias.c:897: warning: pointer of type ‘void *’ used in arithmetic
HOSTCC scripts/mod/modpost.o
/cc/linux-next/scripts/mod/modpost.c: In function ‘parse_elf’:
/cc/linux-next/scripts/mod/modpost.c:412: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:456: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:472: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:489: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:491: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:491: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:494: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:501: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:503: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:503: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c: In function ‘sec_name’:
/cc/linux-next/scripts/mod/modpost.c:716: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:717: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c: In function ‘sech_name’:
/cc/linux-next/scripts/mod/modpost.c:723: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:724: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c: In function ‘reloc_location’:
/cc/linux-next/scripts/mod/modpost.c:1443: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:1444: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:1444: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c: In function ‘section_rela’:
/cc/linux-next/scripts/mod/modpost.c:1520: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:1521: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c: In function ‘section_rel’:
/cc/linux-next/scripts/mod/modpost.c:1564: warning: pointer of type ‘void *’ used in arithmetic
/cc/linux-next/scripts/mod/modpost.c:1565: warning: pointer of type ‘void *’ used in arithmetic
Thanks,
Fengguang
next prev parent reply other threads:[~2010-11-04 2:20 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
2010-11-03 17:55 ` Linus Torvalds
2010-11-03 21:54 ` Tetsuo Handa
2010-11-04 2:20 ` Wu Fengguang [this message]
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=20101104022052.GA7800@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.