2002-11-10 18:45:41

by Andrew Morton

[permalink] [raw]
Subject: Re: 2.5.46-mm2 - oops

Ed Tomlinson wrote:
>
> On November 9, 2002 10:59 pm, Andrew Morton wrote:
>
> > Of note in -mm2 is a patch from Chris Mason which teaches reiserfs to
> > use the mpage code for reads - it should show a nice reduction in CPU
> > load under reiserfs reads.
>
> Booting into mm2 I get:
>
> ...
> Unable to handle kernel NULL pointer dereference at virtual address 00000004
>
> ...
> EIP is at mpage_readpages+0x47/0x140

whoops. The ->readpages API was changed...

--- 25/fs/reiserfs/inode.c~reiserfs-readpages-fix Sun Nov 10 10:44:28 2002
+++ 25-akpm/fs/reiserfs/inode.c Sun Nov 10 10:44:39 2002
@@ -2081,7 +2081,7 @@ static int reiserfs_readpage (struct fil
}

static int
-reiserfs_readpages(struct address_space *mapping,
+reiserfs_readpages(struct file *file, struct address_space *mapping,
struct list_head *pages, unsigned nr_pages)
{
return mpage_readpages(mapping, pages, nr_pages, reiserfs_get_block);

_


2002-11-10 19:11:09

by Ed Tomlinson

[permalink] [raw]
Subject: Re: 2.5.46-mm2 - oops

On November 10, 2002 01:52 pm, Andrew Morton wrote:
> Ed Tomlinson wrote:
> > On November 9, 2002 10:59 pm, Andrew Morton wrote:
> > > Of note in -mm2 is a patch from Chris Mason which teaches reiserfs to
> > > use the mpage code for reads - it should show a nice reduction in CPU
> > > load under reiserfs reads.
> >
> > Booting into mm2 I get:
> >
> > ...
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> >
> > ...
> > EIP is at mpage_readpages+0x47/0x140
>
> whoops. The ->readpages API was changed...
>
> --- 25/fs/reiserfs/inode.c~reiserfs-readpages-fix Sun Nov 10 10:44:28 2002
> +++ 25-akpm/fs/reiserfs/inode.c Sun Nov 10 10:44:39 2002
> @@ -2081,7 +2081,7 @@ static int reiserfs_readpage (struct fil
> }
>
> static int
> -reiserfs_readpages(struct address_space *mapping,
> +reiserfs_readpages(struct file *file, struct address_space *mapping,
> struct list_head *pages, unsigned nr_pages)
> {
> return mpage_readpages(mapping, pages, nr_pages, reiserfs_get_block);

That fixes it.

Thanks
Ed Tomlinson

2002-11-10 19:51:46

by Denis Vlasenko

[permalink] [raw]
Subject: Re: 2.5.46-mm2 - oops

On 10 November 2002 16:52, Andrew Morton wrote:
> Ed Tomlinson wrote:
> > On November 9, 2002 10:59 pm, Andrew Morton wrote:
> > > Of note in -mm2 is a patch from Chris Mason which teaches
> > > reiserfs to use the mpage code for reads - it should show a nice
> > > reduction in CPU load under reiserfs reads.
> >
> > Booting into mm2 I get:
> >
> > ...
> > Unable to handle kernel NULL pointer dereference at virtual address
> > 00000004
> >
> > ...
> > EIP is at mpage_readpages+0x47/0x140
>
> whoops. The ->readpages API was changed...
>
> --- 25/fs/reiserfs/inode.c~reiserfs-readpages-fix Sun Nov 10 10:44:28
> 2002 +++ 25-akpm/fs/reiserfs/inode.c Sun Nov 10 10:44:39 2002
> @@ -2081,7 +2081,7 @@ static int reiserfs_readpage (struct fil
> }
>
> static int
> -reiserfs_readpages(struct address_space *mapping,
> +reiserfs_readpages(struct file *file, struct address_space *mapping,
> struct list_head *pages, unsigned nr_pages)

Why it wasn't catched by compiler? Does C allow assignments with
incompatible pointers without cast?
--
vda