Re: [PATCH] Trivial -critical : BUG()gy behaviour on OOM

From: William Lee Irwin III
Date: Sun Feb 15 2004 - 19:03:10 EST


On Sun, Feb 15, 2004 at 04:47:39PM +0100, BlaisorBlade wrote:
> In short: in vanilla 2.6.3-rc2 (and also 2.6.2-mm1) do_swap_page() can return
> -ENOMEM while value return values are VM_FAULT_*; invalid return values can
> result in BUG() being called, so this patch (or a better fix) should go in
> soon. This patch corrects this by returning VM_FAULT_OOM in that case.
> CC me on replies, please, as I'm not subscribed. Thanks.
> In detail: do_swap_page returns -ENOMEM when memory allocation fails; the
> return value will in turn be returned by handle_pte_fault and handle_mm_fault
> to this code in do_page_fault:

Yep. This is bust.
akpm please apply.


-- wli
-
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/