Yinghai Lu
f1af98c762
memblock: Fix wraparound in find_region()
When trying to find huge range for crashkernel, get
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at arch/x86/mm/memblock.c:248 memblock_x86_reserve_range+0x40/0x7a()
[ 0.000000] Hardware name: Sun Fire x4800
[ 0.000000] memblock_x86_reserve_range: wrong range [0xffffffff37000000, 0x137000000)
[ 0.000000] Modules linked in:
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.36-rc5-tip-yh-01876-g1cac214-dirty #59
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffff82816f7e>] ? memblock_x86_reserve_range+0x40/0x7a
[ 0.000000] [<ffffffff81078c2d>] warn_slowpath_common+0x85/0x9e
[ 0.000000] [<ffffffff81078d38>] warn_slowpath_fmt+0x6e/0x70
[ 0.000000] [<ffffffff8281e77c>] ? memblock_find_region+0x40/0x78
[ 0.000000] [<ffffffff8281eb1f>] ? memblock_find_base+0x9a/0xb9
[ 0.000000] [<ffffffff82816f7e>] memblock_x86_reserve_range+0x40/0x7a
[ 0.000000] [<ffffffff8280452c>] setup_arch+0x99d/0xb2a
[ 0.000000] [<ffffffff810a3e02>] ? trace_hardirqs_off+0xd/0xf
[ 0.000000] [<ffffffff81cec7d8>] ? _raw_spin_unlock_irqrestore+0x3d/0x4c
[ 0.000000] [<ffffffff827ffcec>] start_kernel+0xde/0x3f1
[ 0.000000] [<ffffffff827ff2d4>] x86_64_start_reservations+0xa0/0xa4
[ 0.000000] [<ffffffff827ff3de>] x86_64_start_kernel+0x106/0x10d
[ 0.000000] ---[ end trace a7919e7f17c0a725 ]---
[ 0.000000] Reserving 8192MB of memory at 17592186041200MB for crashkernel (System RAM: 526336MB)
This is caused by a wraparound in the test due to size > end;
explicitly check for this condition and fail.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <4CAA4DD3.1080401@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-10-05 21:45:35 -07:00
..
2010-08-12 08:43:29 -07:00
2010-08-27 11:13:47 -07:00
2010-03-30 22:02:32 +09:00
2010-05-25 08:06:59 -07:00
2010-03-06 11:26:25 -08:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-08-09 20:44:58 -07:00
2010-03-06 11:26:23 -08:00
2010-08-05 09:22:24 -05:00
2010-08-12 10:15:10 -07:00
2010-08-11 09:23:11 +02:00
2010-08-09 20:44:54 -07:00
2009-12-16 12:19:59 +01:00
2010-07-14 17:14:00 +10:00
2010-03-30 22:02:32 +09:00
2010-08-08 21:57:23 +01:00
2010-08-09 20:45:03 -07:00
2010-01-07 11:58:36 -06:00
2009-12-16 12:20:00 +01:00
2010-07-14 17:14:00 +10:00
2010-10-05 21:45:35 -07:00
2010-08-11 08:59:19 -07:00
2010-05-25 08:07:02 -07:00
2010-08-12 10:15:10 -07:00
2010-08-24 12:13:20 -07:00
2010-08-09 20:44:58 -07:00
2010-08-09 20:44:55 -07:00
2010-05-25 08:06:58 -07:00
2010-08-21 08:49:50 -07:00
2010-08-24 12:13:20 -07:00
2010-03-24 16:31:21 -07:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-03-30 22:02:32 +09:00
2010-05-21 18:31:21 -04:00
2010-08-21 08:49:21 -07:00
2010-08-20 09:34:55 -07:00
2010-08-31 09:45:46 +02:00
2010-07-19 11:54:14 +01:00
2010-08-07 18:20:39 +02:00
2010-08-28 14:07:20 -07:00
2010-04-07 08:38:04 -07:00
2010-03-30 22:02:32 +09:00
2010-05-01 08:30:50 +02:00
2010-05-01 08:30:50 +02:00
2010-06-27 18:50:00 +02:00
2010-03-30 22:02:32 +09:00
2010-05-25 08:07:00 -07:00
2010-08-28 13:54:12 -07:00
2010-08-17 18:33:11 -07:00
2010-08-22 10:08:52 -07:00
2010-08-06 11:44:08 -07:00
2010-08-06 11:44:08 -07:00
2010-08-27 11:12:29 -07:00
2010-05-25 08:06:56 -07:00
2010-03-30 22:02:32 +09:00
2010-05-25 15:06:06 +02:00
2010-08-09 20:45:04 -07:00
2010-08-09 16:47:39 -04:00
2010-08-09 20:44:54 -07:00
2010-08-12 09:09:41 -07:00
2010-08-11 08:59:19 -07:00
2010-08-09 20:45:00 -07:00