Thread (8 messages) 8 messages, 3 authors, 2016-07-29
STALE3625d REVIEWED: 4 (0M)
Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

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

From: Mike Travis <hidden>
Date: 2016-07-27 17:41:49
Also in: lkml

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 <redacted>
Reviewed-by: Nathan Zimmer <redacted>
Tested-by: Frank Ramsay <redacted>
Tested-by: John Estabrook <redacted>
Signed-off-by: Mike Travis <redacted>
---
 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;
 		}
 	}
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help