Re: page_launder() bug

Marcelo Tosatti (marcelo@conectiva.com.br)
Mon, 7 May 2001 22:34:41 -0300 (BRT)


On Mon, 7 May 2001, David S. Miller wrote:

>
> Linus Torvalds writes:
> > YOUR HEURISTIC IS WRONG!
>
> Please start the conversation this way next time.
>
> > I call that a bug. You don't. Fine.
>
> You made it sound like a data corrupter, a kernel crasher, and that
> any bug against a kernel with that patch indicates my patch caused it.
> There is an important distinction between "this is doing something
> silly" and "this will scramble your disk and crash the kernel".
>
> The latter is the conclusion several people came to.
>
> And I wanted a clarification on this, nothing more.
>
> I wanted this clarification from you _BECAUSE_ the original posting in
> this thread saw data corruption which went away after reverting my
> patch. But there is no possible connection between my patch and the
> crashes he saw.

Ugh, there is.

I just thought about this case:

We find a dead swap cache page, so dead_swap_page goes to 1.

We call swap_writepage(), but in the meantime the swapin readahead code
got a reference on the swap map for the page.

We write the page out because "(swap_count(page) > 1)", and we may
not have __GFP_IO set in the gfp_mask. Boom.

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