[IA64] sanity check reserved region usage
authorAlex Williamson <alex.williamson@hp.com>
Tue, 6 Jun 2006 16:36:27 +0000 (10:36 -0600)
committerTony Luck <tony.luck@intel.com>
Wed, 21 Jun 2006 21:32:25 +0000 (14:32 -0700)
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>
arch/ia64/kernel/setup.c

index e4dfda1eb7dd656f65a54320ee6af64cbb5757a9..6dba2d63f24d60dbbad443f8fda9c2f166722867 100644 (file)
@@ -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);
 }