From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbcG2LTi (ORCPT ); Fri, 29 Jul 2016 07:19:38 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:51354 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751123AbcG2LTh (ORCPT ); Fri, 29 Jul 2016 07:19:37 -0400 Date: Fri, 29 Jul 2016 13:17:09 +0200 (CEST) From: Thomas Gleixner To: Mike Travis cc: Ingo Molnar , "H. Peter Anvin" , Andrew Morton , Dimitri Sivanich , Russ Anderson , John Estabrook , Andrew Banman , Nathan Zimmer , x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH 2/4] x86/platform/UV: Fix problem with bad UV4 EFI System Table causing panic In-Reply-To: <20160727173331.676120136@asylum.americas.sgi.com> Message-ID: References: <20160727173331.230927085@asylum.americas.sgi.com> <20160727173331.676120136@asylum.americas.sgi.com> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 27 Jul 2016, Mike Travis wrote: > 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 > Reviewed-by: Nathan Zimmer > Tested-by: Frank Ramsay > Tested-by: John Estabrook > Signed-off-by: Mike Travis > --- > 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); I think the changelog is bogus. What's happening here is a classic use after unmap, which you avoid by this change. > + uv_systab = ioremap(efi.uv_systab, size); Hmm? tglx