Re: [patch] broken fault_in_pages_readable call in

From: Ulrich Weigand
Date: Fri Jun 03 2005 - 14:47:43 EST


Andrew Morton wrote:

>Can you explain the bug a bit more completely? AFACIT, `bytes' here was
>always in the range 0 .. PAGE_CACHE_SIZE, so how can it have caused large
>amounts of the stack segment to have been faulted in?

'buf' is not page-aligned, so 'buf' + 'bytes' can touch the next page,
which may not be mapped. In fact, if 'buf' points to the *last* valid
mapped page (before the stack), and the stack ulimit is unlimited, the
VM_GROWSDOWN logic considers this access a request to grow the stack
down to this very page ...

Bye,
Ulrich

--
Dr. Ulrich Weigand
Linux on zSeries Development
Ulrich.Weigand@xxxxxxxxxx
-
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/