From: Breno Leitao <leitao@debian.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, x86@kernel.org
Subject: Re: [patch 01/15] x86/ioapic: Handle allocation failures gracefully
Date: Mon, 5 Aug 2024 05:53:34 -0700 [thread overview]
Message-ID: <ZrDLTtN2kiPtpY1l@gmail.com> (raw)
In-Reply-To: <20240802155440.275200843@linutronix.de>
On Fri, Aug 02, 2024 at 06:15:34PM +0200, Thomas Gleixner wrote:
> Breno observed panics when using failslab under certain conditions during
> runtime:
>
> can not alloc irq_pin_list (-1,0,20)
> Kernel panic - not syncing: IO-APIC: failed to add irq-pin. Can not proceed
>
> panic+0x4e9/0x590
> mp_irqdomain_alloc+0x9ab/0xa80
> irq_domain_alloc_irqs_locked+0x25d/0x8d0
> __irq_domain_alloc_irqs+0x80/0x110
> mp_map_pin_to_irq+0x645/0x890
> acpi_register_gsi_ioapic+0xe6/0x150
> hpet_open+0x313/0x480
>
> That's a pointless panic which is a leftover of the historic IO/APIC code
> which panic'ed during early boot when the interrupt allocation failed.
>
> The only place which might justify panic is the PIT/HPET timer_check() code
> which tries to figure out whether the timer interrupt is delivered through
> the IO/APIC. But that code does not require to handle interrupt allocation
> failures. If the interrupt cannot be allocated then timer delivery fails
> and it either panics due to that or falls back to legacy mode.
>
> Cure this by removing the panic wrapper around __add_pin_to_irq_node() and
> making mp_irqdomain_alloc() aware of the failure condition and handle it as
> any other failure in this function gracefully.
>
> Reported-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Link: https://lore.kernel.org/all/ZqfJmUF8sXIyuSHN@gmail.com
Tested-by: Breno Leitao <leitao@debian.org>
Thanks Thomas!
--breno
next prev parent reply other threads:[~2024-08-05 12:53 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 16:15 [patch 00/15] x86/ioapic: Robustness fix and cleanup Thomas Gleixner
2024-08-02 16:15 ` [patch 01/15] x86/ioapic: Handle allocation failures gracefully Thomas Gleixner
2024-08-05 12:53 ` Breno Leitao [this message]
2024-08-02 16:15 ` [patch 02/15] x86/ioapic: Mark mp_alloc_timer_irq() __init Thomas Gleixner
2024-08-05 12:55 ` Breno Leitao
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 03/15] x86/ioapic: Cleanup structs Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 04/15] x86/ioapic: Use guard() for locking where applicable Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 05/15] x86/apic: Provide apic_printk() helpers Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 06/15] x86/apic: Cleanup apic_printk()s Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 07/15] x86/ioapic: " Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 08/15] x86/ioapic: Cleanup guarded debug printk()s Thomas Gleixner
2024-08-04 14:34 ` Qiuxu Zhuo
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 09/15] x86/mpparse: Cleanup apic_printk()s Thomas Gleixner
2024-08-04 14:45 ` Qiuxu Zhuo
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 10/15] iommu/vt-d: Cleanup apic_printk() Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 11/15] x86/ioapic: Move replace_pin_at_irq_node() to the call site Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 12/15] x86/ioapic: Cleanup comments Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 13/15] x86/ioapic: Cleanup bracket usage Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 14/15] x86/ioapic: Cleanup line breaks Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 15/15] x86/ioapic: Cleanup remaining coding style issues Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-04 15:06 ` [patch 00/15] x86/ioapic: Robustness fix and cleanup Qiuxu Zhuo
2024-08-05 13:00 ` Breno Leitao
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=ZrDLTtN2kiPtpY1l@gmail.com \
--to=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--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