Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757960AbcJHKLe (ORCPT ); Sat, 8 Oct 2016 06:11:34 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:46015 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754693AbcJHKL0 (ORCPT ); Sat, 8 Oct 2016 06:11:26 -0400 Date: Sat, 8 Oct 2016 12:08:36 +0200 (CEST) From: Thomas Gleixner To: Yinghai Lu cc: Tang Chen , Ingo Molnar , "H. Peter Anvin" , Tony Luck , Linux Kernel Mailing List , "Rafael J. Wysocki" , Len Brown , "linux-tip-commits@vger.kernel.org" Subject: Re: [tip:x86/urgent] x86/acpi: Prevent LAPIC id 0xff from being accounted In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 Content-Length: 1409 Lines: 48 On Fri, 7 Oct 2016, Yinghai Lu wrote: > On Fri, Oct 7, 2016 at 10:33 PM, Yinghai Lu wrote: > > On Fri, Oct 7, 2016 at 10:26 PM, Yinghai Lu wrote: > >> On Fri, Oct 7, 2016 at 6:28 AM, tip-bot for Thomas Gleixner > >>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c > >>> index 32a7d70..6d35baf 100644 > >>> --- a/arch/x86/kernel/acpi/boot.c > >>> +++ b/arch/x86/kernel/acpi/boot.c > >>> @@ -233,6 +233,9 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end) > >>> > >>> acpi_table_print_madt_entry(header); > >>> > >>> + if (processor->id >= 0xff) > >>> + return -EINVAL; > >>> + > >>> /* > >>> * We need to register disabled CPU as well to permit > >>> * counting disabled CPUs. This allows us to size > >> > >> > >> some thing is wrong: > >> > >> [ 71.787437] ACPI: LAPIC (acpi_id[0xff] lapic_id[0xff] disabled) > >> [ 71.799681] ACPI: Error parsing LAPIC/X2APIC entries > >> [ 71.809934] ACPI: Invalid BIOS MADT, disabling ACPI > >> > >> looks like should change > >> return -EINVAL ; > >> ==> > >> return 0; Indeed. > > > > also processor->id is u8, > > > > so the patch should be: > > + if (processor->id == 0xff) > + return 0; > + Right. Amended the patch and pushed it out. Thanks for pointing it out, tglx