From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E23403AEF46 for ; Thu, 20 Aug 2026 07:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787212172; cv=none; b=EIcosTZ/hJgSm9GE7FoUqv8GWOJum3NFa52ryXF0j/MlB5jSL1o08khv3LlTevRVgoKBywtgRdeRooqUQgVVbiIYF5xxJR9p9S54z6SfyNjpaKBTOYReMz1tadlovv0/1xekyEg1ecwHoqf4FHj4UPsdk4hVThAwCi5G3ZysL4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787212172; c=relaxed/simple; bh=4VXCdqZc+fSqmhIsTGPtror6gDB9VKDxQ3GFNuZl+jk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=Z+vUe3GDsnq4rZ1CC7kY1DoCBlqIjGPSze26erAi8biZ4GcUtXGCnk0xMwjfpUwnUjjvsGez90ZHlruTssyaCXV7UyUmDPvGvspq3U+ugy/POCh+WICwkDi0JcLFH7nDh4KOureiOeXAlbUMY8SERQf9ldVH/hGHsgpTzFaxU2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oUzV5NUT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oUzV5NUT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A17B31F000E9; Thu, 20 Aug 2026 07:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1787212171; bh=9XO9eowd/dV84ZAx7gyqi5XboHHy2Bt3ikU1Np6lzWY=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=oUzV5NUTVMcg+oCn9sknOgXRHHQIy/jQzVjA0KpZowQtICOExz9e60beuCG/g8H6A FVFRZBDWtsY+YyAlTWPSQ9wq6y+MFSi5SEPhSxl260bfErJwlFACSXiL4ujByDBULd 7NcbJ9oi3YAXx+8t9wpC368F83gbmWezhTq1De5gPZ+bcVyXwlrIC1frGpwXrdneJv d+rcUGAuE/1F2vCEaW9iAczW5zX9nLzZhSteiQznj2Fm992DvaKHjYME30Xgbt6nvA S8PVPUdKAkam19RBt7hkLOT8dpQnFv0Xyz/f/2kZ4KXbNTr3rUnfJZ3J2QuSdH6+o7 Bd7V+RJ6+2WKA== From: Thomas Gleixner To: Haofeng Li Cc: linux-kernel@vger.kernel.org, Haofeng Li <13266079573@163.com>, Haofeng Li , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Samuel Holland , linux-riscv@lists.infradead.org, Marc Zyngier , Radu Rendec Subject: Re: [PATCH 00/16] irqchip: harden initialization error paths In-Reply-To: <20260714122351.3274006-1-lihaofeng@kylinos.cn> References: <20260714122351.3274006-1-lihaofeng@kylinos.cn> Date: Thu, 20 Aug 2026 09:49:27 +0200 Message-ID: <87y0e1i648.ffs@fw13> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain 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