提交 eed63519 编写于 作者: I Ian Campbell 提交者: Ingo Molnar

x86: Do not free zero sized per cpu areas

This avoids an infinite loop in free_early_partial().

Add a warning to free_early_partial() to catch future problems.

-v5: put back start > end back into WARN_ONCE()
-v6: use one line for warning, suggested by Linus
-v7: more tests
-v8: remove the function name as suggested by Johannes
     WARN_ONCE() will print out that function name.
Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
Signed-off-by: NYinghai Lu <yinghai@kernel.org>
Tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: NJoel Becker <joel.becker@oracle.com>
Tested-by: NStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: NJohannes Weiner <hannes@cmpxchg.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Miller <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1269830604-26214-4-git-send-email-yinghai@kernel.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 c967da6a
......@@ -333,6 +333,12 @@ void __init free_early_partial(u64 start, u64 end)
struct early_res *r;
int i;
if (start == end)
return;
if (WARN_ONCE(start > end, " wrong range [%#llx, %#llx]\n", start, end))
return;
try_next:
i = find_overlapped_early(start, end);
if (i >= max_early_res)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册