summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-11-11 17:18:59 +0100
committerMatt Fleming <matt.fleming@intel.com>2013-11-28 21:16:56 +0100
commit1f3a8bae21a22808f242ccfb22aca37a635e261e (patch)
tree5dfda7039c62c9a6d6e156f12e1ba330d9a3b486 /arch
parentefivars, efi-pstore: Hold off deletion of sysfs entry until the scan is compl... (diff)
downloadlinux-1f3a8bae21a22808f242ccfb22aca37a635e261e.tar.xz
linux-1f3a8bae21a22808f242ccfb22aca37a635e261e.zip
x86/efi: Fix earlyprintk off-by-one bug
Dave reported seeing the following incorrect output on his Thinkpad T420 when using earlyprintk=efi, [ 0.000000] efi: EFI v2.00 by Lenovo ACPI=0xdabfe000 ACPI 2.0=0xdabfe014 SMBIOS=0xdaa9e000 The output should be on one line, not split over two. The cause is an off-by-one error when checking that the efi_y coordinate hasn't been incremented out of bounds. Reported-by: Dave Young <dyoung@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/efi/early_printk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/platform/efi/early_printk.c b/arch/x86/platform/efi/early_printk.c
index 6599a0027b76..81b506d5befd 100644
--- a/arch/x86/platform/efi/early_printk.c
+++ b/arch/x86/platform/efi/early_printk.c
@@ -142,7 +142,7 @@ early_efi_write(struct console *con, const char *str, unsigned int num)
efi_y += font->height;
}
- if (efi_y + font->height >= si->lfb_height) {
+ if (efi_y + font->height > si->lfb_height) {
u32 i;
efi_y -= font->height;