From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 09A2233ADBC for ; Thu, 26 Mar 2026 21:11:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774559477; cv=none; b=TQd7I/U55OgxxIv7GjK4lsRbv6laOWthnmC+X8D/FtUAHYJ4e8pv2AbWwzTVTy9iy2jxTrz38gS3ZbGzxn/fMbiFbTX035UYiu2ySy46qjORE/FIsAvf6CTU8RvexLBIT4bZD0M/xF4nbE+RH/Xt3E2SLcTDLjARdHydXLDAk+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774559477; c=relaxed/simple; bh=nmPUByaQ/QnTxCRWBGNEHbpnCBsoVRLQuIrNbw/3NJw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=rG7otVIQfyY32Xse/Me14krjDuntJcmtKtNgybZ41qeSSIRO7dWLVsm5TiPcXyHL6dvQM8asoQZDfvsQ915J6z468VEk3bx7b7giyw2GAwWD0IEZ92uVjRhe8XYw/DbSPh9lMhQ3CZ0028y7rexw7sBQIwoWo1I7rZWHNFfRo78= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Abbb4BeU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Abbb4BeU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17F12C116C6; Thu, 26 Mar 2026 21:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774559476; bh=nmPUByaQ/QnTxCRWBGNEHbpnCBsoVRLQuIrNbw/3NJw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Abbb4BeU5YPfScdEFIzkgNbmSCi2/5ZGEIQBGRNFFSaE3uRBYwhQ+1Lq8ja3ATite E252iOcBLOmOAZXijTCSnnq5zOX6arh7PGFN1EbsOaoRrudzPijaNOl3nUbHZ9MVh9 0s60+jKS0mDTL/0wZW6L3n15qjoeXMtEia/FPHMZA+FrWoQFsq9BZ19+oH/0br4yE+ FTU5YHb4eSd4XsrELRQ16h1Ym/bsR51EVSUIPyOBaiedwECH88EPjIBQ0GFykPd1ng 9+6dHP2nGUQ2NamgQ+PWbbz4S5W41Fz6sa5zObIHNuxgOaG9X6WDcCcQaOFMC70drK kEa6avUQVC9xw== From: Thomas Gleixner To: Dmitry Ilvokhin Cc: LKML , x86@kernel.org, Neil Horman , Radu Rendec Subject: Re: [patch v2 09/14] genirq: Expose irq_find_desc_at_or_after() in core code In-Reply-To: References: <20260320131108.344376329@kernel.org> <20260320132102.638201987@kernel.org> Date: Thu, 26 Mar 2026 22:11:12 +0100 Message-ID: <87h5q2cn4f.ffs@tglx> 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 Thu, Mar 26 2026 at 19:13, Dmitry Ilvokhin wrote: >> -static unsigned int irq_find_at_or_after(unsigned int offset) >> +struct irq_desc *irq_find_desc_at_or_after(unsigned int offset) >> { >> unsigned long index = offset; >> - struct irq_desc *desc; >> - >> - guard(rcu)(); > > Is the drop of guard(rcu)() intentional here? irq_get_next_irq() > dereferences the returned pointer after mt_find() has dropped > rcu_read_unlock(). Should it hold its own guard(rcu)() to keep the same > behaviour as before? Good catch. The caller of irq_find_at_or_after() needs to hold it.