Re: [00/17] Large Blocksize Support V3

From: Jens Axboe
Date: Wed Apr 25 2007 - 13:57:34 EST


On Wed, Apr 25 2007, Christoph Lameter wrote:
> On Wed, 25 Apr 2007, Jens Axboe wrote:
>
> > I need this patch to actually boot the thing, or it bombs with a NULL
> > deref in page_cache_size().
>
> Yeah on 32 bit which I disabled....

Yep, on the grounds that devices may not cover the full address space.
On my box they do.

> > It then boots, doing a little test with 8kb ext2 quickly dies though:
> >
> > BUG: unable to handle kernel NULL pointer dereference at virtual address
>
> > EIP: [<d8149519>] 0xd8149519 SS:ESP 0068:e9049d1c
> >
> > That's here:
> >
> > page = get_page_from_freelist(gfp_mask|__GFP_HARDWALL, order,
> > zonelist, ALLOC_WMARK_LOW|ALLOC_CPUSET);
> > -> if (page)
> > goto got_pg;
>
> Impossible. page is not dereferenced. Cannot cause a NULL pointer
> deference.

Sure I know that, hence the oops happening there is likely fallout from
something scribbling where it should not have.

> > which doesn't look healthy. Note that this is a 32-bit machine, I
> > removed the 32-bit check (devices in this box are fine).
>
>
> >
> > --- fs/libfs.c~ 2007-04-25 13:30:50.000000000 +0200
> > +++ fs/libfs.c 2007-04-25 13:31:00.000000000 +0200
> > @@ -330,7 +330,7 @@
> > int simple_prepare_write(struct file *file, struct page *page,
> > unsigned from, unsigned to)
> > {
> > - unsigned int page_size = page_cache_size(file->f_mapping);
> > + unsigned int page_size = page_cache_size(page->mapping);
>
> We do a write operation on a file that has no mapping (and thus no radix
> tree etc etc)? Is that legit?

Probably not.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/