Re: [PATCH] memblock: Fix big size with find_region()

From: H. Peter Anvin
Date: Wed Oct 06 2010 - 18:13:05 EST


On 10/06/2010 02:06 PM, Andrew Morton wrote:
>
> This seems rather odd. If some caller is passing in size>end then that
> caller is buggy isn't it? A memory block which ends at 0x1000 and has
> a size of 0x2000 is nonsensical.
>
> So shouldn't we at leat emit a warning so tht the offending caller can
> be found and fixed?
>

I don't think this is necessarily a bug in the caller -- it just
indicates that it has a request that is impossible to fulfill -- but
that can happen for a lot of other reasons.

Keep in mind that the range and the size will typically come from
different origins. As such, it's not clear to me that this is something
that requires printing a specific error message for any more than any
other allocation failure, but perhaps you disagree?

-hpa


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