浏览代码

[IA64] sanity check reserved region usage

One more trivial, stand-alone patch from the Xen/ia64 review.  Sanity
check usage of the reserved region numbers.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Alex Williamson 19 年之前
父节点
当前提交
5eb1d63f5f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      arch/ia64/kernel/setup.c

+ 1 - 0
arch/ia64/kernel/setup.c

@@ -260,6 +260,7 @@ reserve_memory (void)
 	n++;
 
 	num_rsvd_regions = n;
+	BUG_ON(IA64_MAX_RSVD_REGIONS + 1 < n);
 
 	sort_regions(rsvd_region, num_rsvd_regions);
 }