2001-10-01 12:46:13

by Chris Mason

[permalink] [raw]
Subject: Re: 2.4.11-pre1 oops in bdget()



On Monday, October 01, 2001 02:02:23 AM +0200 Mikael Pettersson
<[email protected]> wrote:

> Running 2.4.11-pre1 built with gcc 2.95.3, building 2.4.10-ac1,
> final dd in 'make bzdisk' oopsed with the following:

> Unable to handle kernel paging request at virtual address d08b8b60
> c0133664
> *pde = 0fd41067
> Oops: 0000
> CPU: 0
> EIP: 0010:[<c0133664>]

>>> EIP; c0133664 <bdget+f8/180> <=====
> Trace; c0133792 <bd_acquire+26/80>
> Trace; c0133c16 <blkdev_open+16/b8>

Well, this isn't good, looks like we've already freed something and are
still using it. Could you please turn on 'Debug memory allocations' in the
kernel debugging section of make config, and try to reproduce again?

-chris


2001-10-01 15:35:19

by Linus Torvalds

[permalink] [raw]
Subject: Re: 2.4.11-pre1 oops in bdget()


On Mon, 1 Oct 2001, Chris Mason wrote:
>
> >>> EIP; c0133664 <bdget+f8/180> <=====
> > Trace; c0133792 <bd_acquire+26/80>
> > Trace; c0133c16 <blkdev_open+16/b8>
>
> Well, this isn't good, looks like we've already freed something and are
> still using it. Could you please turn on 'Debug memory allocations' in the
> kernel debugging section of make config, and try to reproduce again?

No, it's actually the thing that Al already warned me about, and I didn't
realize how serious it was.

The thing we oops on is the _old_ blksize_size[] array information for the
floppy, which was loaded as a module and then unloaded - it's ugly that it
doesn't clean up its copy of the blksize_size array, but the real cause
for the problem is that bdget() references it before it has opened the
device.

The (untested) fix is to just remove the line in bdget() that sets
i_blkbits, as the thing is later set correctly in blkdev_get().

Linus