Re: [PATCH] x86: Fix dmi_alloc() to not advance alloc index incase of failure
From: Ingo Molnar
Date: Wed Dec 19 2007 - 05:51:14 EST
* Parag Warudkar <parag.warudkar@xxxxxxxxx> wrote:
> dmi_alloc() for CONFIG_X86_64 is defined to allocate from a static
> array and it maintains a allocation index which is advanced each time
> allocation is attempted - it gets incremented even if an allocation
> fails thereby depriving any future request that may be small enough to
> be satisfied from the array.
>
> Fix this by first testing if allocation is going to be possible and
> incrementing alloc index only then.
Thanks, applied. Nice catch!
Ingo
--
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/