[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874j8889ch.ffs@tglx>
Date: Mon, 29 Jul 2024 18:13:34 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Breno Leitao <leitao@...ian.org>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>
Cc: leit@...a.com, "Peter Zijlstra (Intel)" <peterz@...radead.org>, Wei Liu
<wei.liu@...nel.org>, Marc Zyngier <maz@...nel.org>, Adrian Huang
<ahuang12@...ovo.com>, "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/apic: Add retry mechanism to add_pin_to_irq_node()
On Mon, Jul 29 2024 at 07:06, Breno Leitao wrote:
> I've been running some experiments with failslab fault injector running
> to detect a different problem, and the machine always crash with the
> following stack:
>
> can not alloc irq_pin_list (-1,0,20)
> Kernel panic - not syncing: IO-APIC: failed to add irq-pin. Can not proceed
>
> Call Trace:
> panic
> _printk
> panic_smp_self_stop
> rcu_is_watching
> intel_irq_remapping_free
This completely lacks context. When does this happen? What's the system
state? What has intel_irq_remapping_free() to do with the allocation path?
> This happens because add_pin_to_irq_node() function would panic if
> adding a pin to an IRQ failed due to -ENOMEM (which was injected by
> failslab fault injector). I've been running with this patch in my test
> cases in order to be able to pick real bugs, and I thought it might be a
> good idea to have it upstream also, so, other people trying to find real
> bugs don't stumble upon this one. Also, this makes sense in a real
> world(?), when retrying a few times might be better than just
> panicking.
While it seems to make sense, the reality is that this is mostly early
boot code. If there is a real world memory allocation failure during
early boot then retries will not help at all.
> Introduce a retry mechanism that attempts to add the pin up to 3 times
> before giving up and panicking. This should improve the robustness of
> the IO-APIC code in the face of transient errors.
I'm absolutely not convinced by this loop heuristic. That's just a bad
hack.
Thanks,
tglx
Powered by blists - more mailing lists