[PATCH 2/4] x86/platform/UV: Fix problem with bad UV4 EFI System Table causing panic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix a problem that occurs if for some reason the UV4 EFI System Table
is not available, the check inadvertantly can cause a panic.

Reviewed-by: Dimitri Sivanich <sivanich@xxxxxxx>
Reviewed-by: Nathan Zimmer <nzimmer@xxxxxxx>
Tested-by: Frank Ramsay <framsay@xxxxxxx>
Tested-by: John Estabrook <estabrook@xxxxxxx>
Signed-off-by: Mike Travis <travis@xxxxxxx>
---
 arch/x86/platform/uv/bios_uv.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- linux-3.12.orig/arch/x86/platform/uv/bios_uv.c
+++ linux-3.12/arch/x86/platform/uv/bios_uv.c
@@ -201,11 +201,12 @@ void uv_bios_init(void)
 	}
 
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

-- 
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]