Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1453416
| From | Mike Travis <travis@sgi.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic |
| Date | 2016-08-01 21:10 +0200 |
| Message-ID | <s1qL9-1VI-43@gated-at.bofh.it> (permalink) |
| References | <s1qL8-1VI-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Save the size field from the uv_systab struct before doing the iounmap
of the struct pointer, to avoid a null dereference error.
Reviewed-by: Dimitri Sivanich <sivanich@sgi.com>
Reviewed-by: Nathan Zimmer <nzimmer@sgi.com>
Tested-by: Frank Ramsay <framsay@sgi.com>
Tested-by: John Estabrook <estabrook@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
v2: modify description and changelog.
---
arch/x86/platform/uv/bios_uv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- linux.orig/arch/x86/platform/uv/bios_uv.c
+++ linux/arch/x86/platform/uv/bios_uv.c
@@ -200,12 +200,14 @@ void uv_bios_init(void)
return;
}
+ /* Starting with UV4 the UV systab size is variable */
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;
}
}
--
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis <travis@sgi.com> - 2016-08-01 21:10 +0200
[PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic Mike Travis <travis@sgi.com> - 2016-08-01 21:10 +0200
[tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash tip-bot for Mike Travis <tipbot@zytor.com> - 2016-08-10 20:20 +0200
csiph-web