Re: innd mmap bug in 2.4.0-test12

From: Rik van Riel (
Date: Wed Dec 27 2000 - 14:20:33 EST

On Mon, 25 Dec 2000, Dan Aloni wrote:
> On 25 Dec 2000, Zlatko Calusic wrote:
> > Speaking of page_launder() I just stumbled upon two oopsen today on
> > the UP build. Maybe it could give a hint to someone, I'm not that good
> > at Oops decoding.
> I've decoded the Oops I got, and found that the problem is in
> vmscan.c:line-605, where page->mapping is NULL and a_ops gets
> resolved and dereferenced at 0x0000000c.

The code assumes that every page which has the PG_dirty
bit set also has page->mapping set to a valid value.

The BUG() people are getting confirms that this assumption
is not necessarily true and the VM work that's going on will
most likely make it not be true either in some cases.

The (trivial) patch below should fix this problem.

Linus and/or Alan, could you please apply this for the next
pre-patch ?



Hollywood goes for world dumbination,
	Trailer at 11.

--- vmscan.c.orig Wed Dec 27 16:48:24 2000 +++ vmscan.c Wed Dec 27 17:14:32 2000 @@ -601,7 +601,7 @@ * Dirty swap-cache page? Write it out if * last copy.. */ - if (PageDirty(page)) { + if (PageDirty(page) && page->mapping) { int (*writepage)(struct page *) = page->mapping->a_ops->writepage; int result;

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Dec 31 2000 - 21:00:10 EST