From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbdAaSFR (ORCPT ); Tue, 31 Jan 2017 13:05:17 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:35722 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbdAaSDa (ORCPT ); Tue, 31 Jan 2017 13:03:30 -0500 Date: Tue, 31 Jan 2017 19:03:21 +0100 (CET) From: Thomas Gleixner To: Mike Galbraith cc: Borislav Petkov , Ingo Molnar , Andrey Ryabinin , LKML , "H. Peter Anvin" Subject: Re: [PATCH] x86/microcode: Do not access the initrd after it has been freed In-Reply-To: <1485862277.4419.6.camel@gmx.de> Message-ID: References: <3e4b6f03-384d-411e-5243-9d3b0595d5cb@virtuozzo.com> <20170125172321.fpy6cswq3ibqvfgo@pd.tnic> <16165aad-5990-51f9-4dc7-c4b68597a4d5@virtuozzo.com> <20170125192336.kmgxmwcffdo2gxrf@pd.tnic> <20170126165833.evjemhbqzaepirxo@pd.tnic> <7d07442a-c64e-797b-c8c4-ef453df30cde@virtuozzo.com> <20170127090915.zh7ct7cnvx2ds7qk@pd.tnic> <20170130084632.GA25091@gmail.com> <20170130093527.syjz7yldgndml7qb@pd.tnic> <20170131074355.GA17636@gmail.com> <20170131100122.r6ubk5z3t2vm3hxl@pd.tnic> <1485862277.4419.6.camel@gmx.de> 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 On Tue, 31 Jan 2017, Mike Galbraith wrote: > On Tue, 2017-01-31 at 11:01 +0100, Borislav Petkov wrote: > > On Tue, Jan 31, 2017 at 08:43:55AM +0100, Ingo Molnar wrote: > > > (Cc:-ed Mike as this could explain his early boot crash/hang? > > > Mike: please try -tip f18a8a0143b1 that I just pushed out. ) > > > > One other thing to try, Mike, is boot with "dis_ucode_ldr". See whether > > that makes it go away. > > (bisect fingered irqdomain: Avoid activating interrupts more than once) That commit exposed interesting code in x86 land. Can you please try the patch below? Thanks, tglx 8<-------------- diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 1e35dd06b090..52f352b063fd 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -2117,6 +2117,7 @@ static inline void __init check_timer(void) if (idx != -1 && irq_trigger(idx)) unmask_ioapic_irq(irq_get_chip_data(0)); } + irq_domain_deactivate_irq(irq_data); irq_domain_activate_irq(irq_data); if (timer_irq_works()) { if (disable_timer_pin_1 > 0) @@ -2138,6 +2139,7 @@ static inline void __init check_timer(void) * legacy devices should be connected to IO APIC #0 */ replace_pin_at_irq_node(data, node, apic1, pin1, apic2, pin2); + irq_domain_deactivate_irq(irq_data); irq_domain_activate_irq(irq_data); legacy_pic->unmask(0); if (timer_irq_works()) { diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 85e87b46c318..dc6ba5bda9fc 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c @@ -352,6 +352,7 @@ static int hpet_resume(struct clock_event_device *evt, int timer) } else { struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); + irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq)); irq_domain_activate_irq(irq_get_irq_data(hdev->irq)); disable_irq(hdev->irq); irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));