[syslinux:elflink] load_linux: bail if no place for the real mode portion is found

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Mon Feb 4 11:42:02 PST 2013


Commit-ID:  52443dc7dc5a203d053b70e870e6b83986ebb530
Gitweb:     http://www.syslinux.org/commit/52443dc7dc5a203d053b70e870e6b83986ebb530
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Mon, 4 Feb 2013 11:38:07 -0800
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Mon, 4 Feb 2013 11:38:07 -0800

load_linux: bail if no place for the real mode portion is found

Bail in the case of no space for the real mode code.  This can happen
mostly for zImage kernels when the conventional memory ceiling is too
low.

Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>

---
 com32/lib/syslinux/load_linux.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index f67c2e4..471d8a5 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -390,6 +390,9 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
 		break;
 	    }
 	}
+
+	if (!ok)
+	    goto bail;
     }
 
     if (syslinux_add_movelist(&fraglist, real_mode_base, (addr_t) kernel_buf,


More information about the Syslinux-commits mailing list