Re: I just got got another Oops

From: David Newall
Date: Fri Mar 13 2009 - 00:55:26 EST


Gene,

I think it's a null page pointer passed to prep_new_page. It's
difficult to be certain, because it's compiled with -O2, but that's what
it looks like.

Let's test that hypothesis. Let's also compile page_alloc.c with
debugging. Do that by executing the commands in the attached file, and
then doing a make install (or whatever you do.)

But first, let's also sidestep the optimiser by making prep_new_page
public. Do that by changing:

static int prep_new_page(struct page *page, int order, gfp_t gfp_flags)**


in mm/page_alloc.c, near line 637, to:

int my_prep_new_page(struct page *page, int order, gfp_t gfp_flags)**

and by changing:

if (prep_new_page(page, order, gfp_flags))


near line 1137, to:

if (my_prep_new_page(page, order, gfp_flags))


This will prevent the optimiser from inlining that function, and we
would expect to see the error change from
"get_page_from_freelist+0x24b/0x4c0" to "my_prep_new_page+0x0yy/0x0zz".

David
gcc -g -Wp,-MD,mm/.page_alloc.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.3/include -Iinclude -I/home/davidn/NAS/linux.trees.git/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=k8 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(page_alloc)" -D"KBUILD_MODNAME=KBUILD_STR(page_alloc)" -c -o mm/page_alloc.o mm/page_alloc.c

scripts/basic/fixdep mm/.page_alloc.o.d mm/page_alloc.o 'gcc etc' > mm/.page_alloc.o.tmp
rm -f mm/.page_alloc.o.d
mv -f mm/.page_alloc.o.tmp mm/.page_alloc.o.cmd