From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Dimitri Sivanich <sivanich@sgi.com>
Cc: Russ Anderson <rja@sgi.com>, John Estabrook <estabrook@sgi.com>,
Andrew Banman <abanman@sgi.com>, Nathan Zimmer <nzimmer@sgi.com>,
Alex Thorlton <athorlton@sgi.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/4] x86/platform/UV: Fix problem with iounmap UV4 EFI System Table causing panic
Date: Mon, 01 Aug 2016 13:40:51 -0500 [thread overview]
Message-ID: <20160801184050.250424783@asylum.americas.sgi.com> (raw)
In-Reply-To: 20160801184049.811754120@asylum.americas.sgi.com
[-- Attachment #1: uv4_fix_bios_init_error --]
[-- Type: text/plain, Size: 1095 bytes --]
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;
}
}
--
next prev parent reply other threads:[~2016-08-01 19:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 18:40 [PATCH 0/4] x86/platform/UV: SGI UV4 Kernel Fixes Mike Travis
2016-08-01 18:40 ` [PATCH 1/4] x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous Mike Travis
2016-08-10 18:11 ` [tip:x86/urgent] " tip-bot for Mike Travis
2016-08-01 18:40 ` Mike Travis [this message]
2016-08-10 18:11 ` [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 3/4] x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values Mike Travis
2016-08-10 18:12 ` [tip:x86/urgent] " tip-bot for Mike Travis
2016-08-01 18:40 ` [PATCH 4/4] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV Mike Travis
2016-08-10 18:12 ` [tip:x86/urgent] x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems tip-bot for Mike Travis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160801184050.250424783@asylum.americas.sgi.com \
--to=travis@sgi.com \
--cc=abanman@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=athorlton@sgi.com \
--cc=estabrook@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nzimmer@sgi.com \
--cc=rja@sgi.com \
--cc=sivanich@sgi.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox