linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Haofeng Li <lihaofeng@kylinos.cn>
Cc: linux-kernel@vger.kernel.org, Haofeng Li <13266079573@163.com>,
	Haofeng Li <lihaofeng@kylinos.cn>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Samuel Holland <samuel.holland@sifive.com>,
	linux-riscv@lists.infradead.org, Marc Zyngier <maz@kernel.org>,
	Radu Rendec <radu@rendec.net>
Subject: Re: [PATCH 00/16] irqchip: harden initialization error paths
Date: Thu, 20 Aug 2026 09:49:27 +0200	[thread overview]
Message-ID: <87y0e1i648.ffs@fw13> (raw)
In-Reply-To: <20260714122351.3274006-1-lihaofeng@kylinos.cn>

On Tue, Jul 14 2026 at 20:23, Haofeng Li wrote:
> An audit of irqchip initialization and allocation error paths found a
> collection of resource leaks and lifetime issues across several drivers.

A lot of these "fixes" are purely cosmetic and create a false sense of
correctness because if the initialization of the root interrupt
controller of a system fails then machine won't boot at all.

So instead of adding tons of cleanups we rather go and analyze which
controllers are actually root controllers and therefore essential for
the machine to boot. For those the only valid error handling is:

__probe(....)
{
        all setup magic
}

probe(....)
{
	if (__probe(..._))
	    panic("Failed to initialize root interrupt controller");
}

That is the proper hardening and allows to remove a boatload of
pointless cleanups.

Where cleanups actually matter are for secondary interrupt controllers
which are not essential for the machine to get up and "running",
especially those which can be built as modules.

Thanks,

        tglx

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2026-08-20  7:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 12:23 [PATCH 00/16] irqchip: harden initialization error paths Haofeng Li
2026-07-14 12:23 ` [PATCH 01/16] irqchip/riscv-imsic: fix MMIO lookup OOB and NULL cleanup Haofeng Li
2026-07-14 13:15   ` Anup Patel
2026-07-25 16:13   ` Radu Rendec
2026-07-14 13:24 ` [PATCH 03/16] irqchip/sifive-plic: do not iounmap devm mappings Haofeng Li
2026-07-14 15:05   ` Anup Patel
2026-08-20  6:36   ` Thomas Gleixner
2026-07-25 16:29 ` [PATCH 00/16] irqchip: harden initialization error paths Radu Rendec
2026-08-20  7:49 ` Thomas Gleixner [this message]
2026-09-05  4:11   ` Nam Cao

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=87y0e1i648.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=13266079573@163.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=lihaofeng@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=radu@rendec.net \
    --cc=samuel.holland@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).