From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.mindbit.ro (xs1.mindbit.ro [80.86.107.70]) (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 27CAC19343E for ; Tue, 24 Mar 2026 20:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.86.107.70 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774384612; cv=none; b=QcwrgkOm7I6Sfter0O2BGBnyDF+XdqjHWZprzEgeNHp10FzyZgeSMJQsWW2JUsumvAfOMoCOvsbYIJ+dhM9lVyKnwMer3WRNHiFAhf4viP5L/UR3wCdwcvm+cSOsyRwxofvmlCwDAoYf1SvbdyTJC+fbJw+H44RbNUdyeV/uq3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774384612; c=relaxed/simple; bh=ZVygmo1dnVL4urAUBIIqwB6FUtHmYN2TFMbckyJfhOo=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=mxwFvaaxZGyBwbQoYLvEEYSnBxsPqFD2hyacsADwJ/Ygi5JMByl+KXpfFTMknjcBtF4VJET7wNGfRScfhOyr1Hd9EZRCu2bd4wZ2pltNXTaQ9a3BWY2eHzWcj7/NBhDpiAP+Br9pNd1mFbT5BWM8Jmn6m5PCAwUF6SHC8nQR8DY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rendec.net; spf=pass smtp.mailfrom=rendec.net; dkim=pass (2048-bit key) header.d=rendec.net header.i=@rendec.net header.b=To5353n0; arc=none smtp.client-ip=80.86.107.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=rendec.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rendec.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rendec.net header.i=@rendec.net header.b="To5353n0" Received: from thinkpad-p1.localdomain (pool-174-112-193-187.cpe.net.cable.rogers.com [174.112.193.187]) by mail.mindbit.ro (Postfix) with ESMTPSA id 5B5FEC238F; Tue, 24 Mar 2026 22:36:47 +0200 (EET) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.mindbit.ro 5B5FEC238F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rendec.net; s=default; t=1774384608; bh=fqVBt3EIF5b345m18395nSrtkzDnKhlzUGHZ6S9ElTM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=To5353n0S4Z0+ivPgI8oawAQtaeN0lMcPigYJMKGsFCha1oRwXiaMhDUFDd56yKJT 3oxYh0VohKcxv69ZSam0uU9V041vOGVi1q+akPFq7ysnSIEhwHTxVBBYAOrEGUqjCX 69DVpXAy78H6PFEKDQGTpYNJ8+izeFMOPzOaBOzeDL0Jhdqd0/eefBUaCxzA5GSuCJ ELP7PONNBpojO5ENUx/Xktd4HXbTlr7MpKlQB+7RFjE60isOWvNWbfAwkEbm8mZIq3 jO7NNdnzGVj0hUupFsg22dA4c55MZayU9PtHSvBjW8rtUy0lip9zAlwAglVUrBUej/ QYnJPtklTcrqw== Message-ID: <3c57849df0a30013ac545641079ecfdcab3a5e3a.camel@rendec.net> Subject: Re: [patch v2 06/14] genirq: Cache the condition for /proc/interrupts exposure From: Radu Rendec To: Thomas Gleixner , LKML Cc: x86@kernel.org, Dmitry Ilvokhin , Neil Horman Date: Tue, 24 Mar 2026 16:36:45 -0400 In-Reply-To: <87y0jhezpf.ffs@tglx> References: <20260320131108.344376329@kernel.org> <20260320132102.431714412@kernel.org> <7d0dcf3dc90152a71de920dd22cc5eed57bab695.camel@rendec.net> <87y0jhezpf.ffs@tglx> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2 (3.56.2-2.fc42) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2026-03-24 at 21:31 +0100, Thomas Gleixner wrote: > On Mon, Mar 23 2026 at 16:58, Radu Rendec wrote: > > > +void irq_proc_update_valid(struct irq_desc *desc) > > > +{ > > > + u32 set =3D _IRQ_PROC_VALID; > > > + > > > + if (irq_settings_is_hidden(desc) || !desc->action || > > > + =C2=A0=C2=A0=C2=A0 irq_desc_is_chained(desc) || !desc->kstat_irqs) > >=20 > > Can desc->kstat_irqs ever be NULL? Looking at kernel/irq/irqdesc.c, it > > seems to me that it's allocated always and very early (before every > > other field in struct irq_desc), and with an explicit check for NULL on > > allocation. It's also deallocated late, right before struct irq_desc > > itself is deallocated (in irq_kobj_release()). >=20 > Well spotted. That's a left over from histerical code. Thanks for confirming! I was intrigued because you removed that check in a previous patch, and I looked. And while looking, I noticed there were quite a few other spots where the check was still done, and I wanted to ask you anyway. I'll prepare a cleanup patch and send it.