Revert 20523:bd52fff29e6e "Remove redundant tests in __start_xen()"
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Dec 2009 13:39:51 +0000 (13:39 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 1 Dec 2009 13:39:51 +0000 (13:39 +0000)
Consensus is that code is clearer with the tests, even though they are
redundant.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/setup.c

index 7615546cc3dddbc2b8b1554228129a8f0b442eb0..98249807bc933e0780b7bb171a89022e90d00135 100644 (file)
@@ -758,7 +758,7 @@ void __init __start_xen(unsigned long mbi_p)
 #endif
 
         /* Is the region suitable for relocating the multiboot modules? */
-        if ( !initial_images_start &&
+        if ( !initial_images_start && (s < e) &&
              ((e-s) >= (modules_length+modules_headroom)) )
         {
             initial_images_end = e;
@@ -776,7 +776,8 @@ void __init __start_xen(unsigned long mbi_p)
             }
         }
 
-        if ( !kexec_crash_area.start && ((e-s) >= kexec_crash_area.size) )
+        if ( !kexec_crash_area.start && (s < e) &&
+             ((e-s) >= kexec_crash_area.size) )
         {
             e = (e - kexec_crash_area.size) & PAGE_MASK;
             kexec_crash_area.start = e;