Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp22617lqm; Mon, 10 Jun 2024 11:23:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1qvzGZBdAhpT1itQrgsdUzlQfVtpTWc7bWElHmqnzur/nfITj2ddzPFBoqHtGDPpOU7mj2jS8343C9lkbKF11BSKluzBAVTi/UpgPfA== X-Google-Smtp-Source: AGHT+IE2r2P9TTsZCWx6DbtLuLdJdU4V+bStz5paSqYPxElW6ICfu+v7XSC6TQ5TAYbUVEvQfuQi X-Received: by 2002:a05:6e02:1c24:b0:374:8928:83a4 with SMTP id e9e14a558f8ab-3758033cde0mr113737065ab.14.1718043809088; Mon, 10 Jun 2024 11:23:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718043809; cv=pass; d=google.com; s=arc-20160816; b=LlydovYb+8vtbzPxXuSI9gL/VEZWkeUb1LbBSIZZgCyqKLfT4G27YHA97gnSvtN6H9 lAxSBwg13AXSw+wiFwTb+KFyp0WzZjTLYWR95r7tMFtwc6QaSgwh9uYaAQybNbdPwJ03 ufzPEzFBJK7w5lBzAW6x6KXeaLiN7k7pTGoaVxEIdAXTjGIlr5dp1W6J9frYWX3Mrjp9 4cAST8E1NRpOcuJMmIzWY6B9RUU9iBJN31jNRtlwMFS+WC1IMX/35d0BX5lDFIg0wM28 b5QykzxZNsUM1tfPyE2vzUYI0LZCjy+tVgMWK0/XvD/JIubhlujhNZEI8Y5kJK1qsNAY xxTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=m4Pj/Je9A5FG/IZDCfStO8t9dhzu69BwE+sdDR8YKBY=; fh=/jRpIFZVxd7s8f0Phqb2i5t3MD83P3q6/DZ97vzIrc0=; b=gcV6h8bHPzg8f9OkKcJD10riOgwzyYHFtEkcUd5UEVJlfvlWQey36Bsz50IG6WtxEk 1p5L3qXZ4mM/rwUrLew1cbHsQBkwnQv2OKNNcKxqMRUpz9coU4biAY8OHfrLpKtgOhvJ yRbwXBsXKQS+SN+EabDKHaU11hpK7b7QY1Hi5IKOQLQDRaKV9sOOwYg/xV57WgrKnDyb N+EPLWBxPkjTvD8NM7YEvqus8ZGxqZ1KIE9synAG/OsrMZfqVSJ+/aDxMOOUaloHyOyo elWm7iMm92HbI9YliKknyyTCid0x6P4xfwiQUybAGNMoPPOF5CckxyTe38az8FSGGtfF JRvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MDjdbKon; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-208725-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e720e529a0si4607922a12.527.2024.06.10.11.23.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 11:23:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208725-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MDjdbKon; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-208725-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CCB212825A0 for ; Mon, 10 Jun 2024 18:23:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B12814E2E9; Mon, 10 Jun 2024 18:23:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MDjdbKon"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="7B4O+8a3" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 E9C2F15A8; Mon, 10 Jun 2024 18:23:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718043793; cv=none; b=K6UfQkB9zmh5XZXFRHTslZYyhjV5mXqUsjwN3yYfgNGhKL6nOnZ6T+CwmcLmBTcVO+wSSfbiT6BNmWkYTbaRnHek3abNZYQDasC8gOdZWSc77YSGDwXAcL+jeJ9CctDQubqMhQEecn6q6K7aMeywoztELUcLjkFCgqKjtZJfIgI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718043793; c=relaxed/simple; bh=IYp/Eu2YbA2P68s7eG9aebS5dGio86h9J8gtwGZ3P/M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=JcI1KOtrWQ2OuVdydtM1ppu+FacjrHndxwPC3EweAwtg+CqCGE6mGP1c4ZgPm8nAwYTfNUE/iXcnAxFhXPsW+sL1PnH5wk7lKGrv9CkHg5/D4Q6rKuxuTXRoB75C1KVQfuGWnekPeVKzQ7eJK8Pe4DH2eE6TeawT+LV0LeivOPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MDjdbKon; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=7B4O+8a3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718043789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m4Pj/Je9A5FG/IZDCfStO8t9dhzu69BwE+sdDR8YKBY=; b=MDjdbKon8frK80IXx9Io9Q+o/iRM9aXXNubuqKEBoCU0jwZTaSjLSZpeSIU0BQ76sQ2u0V cEbFXQdWJ5F88hHMt+vqH3hOI0L89iqjsW7JEzYMr3090NolcxFPrUSf24dgmsBxQm99mE LB0z+548S/GtY57hCL9IVs9SAZImodNKT/+LRgyyHf6OkMjfswGwzti5Y2qhWhMiWpL4Di eYWAgk1uzvfXPJPge/GQzrG9W5IHU+BB6myCMv5yxQ+/zG2SpH5Fzdm1CBCRQyyZQdrfCI w4k/OLxRqQAqDo4zhzauAuq4YWGFGYyHWvb7OcbJ4s83a8D8lh8tojmdQHmYaw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718043789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=m4Pj/Je9A5FG/IZDCfStO8t9dhzu69BwE+sdDR8YKBY=; b=7B4O+8a3CRiHfb/dt3owFewzGAjZgY0QbpL3yW26fps4djF3vlAv1qcIEC5g+Fw2UaHGIL sNIFfpCEJdGtMABw== To: Peng Liu , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, maz@kernel.org, vincent.whitchurch@axis.com, iwtbavbm@gmail.com, 158710936@qq.com Subject: Re: [PATCH] genirq: Keep handle_nested_irq() from touching desc->threads_active In-Reply-To: <20240609183046.GA14050@iZj6chx1xj0e0buvshuecpZ> References: <20240609183046.GA14050@iZj6chx1xj0e0buvshuecpZ> Date: Mon, 10 Jun 2024 20:23:09 +0200 Message-ID: <877cewwtbm.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 Mon, Jun 10 2024 at 02:30, Peng Liu wrote: > handle_nested_irq() is supposed to be running inside the parent thread > handler context. It per se has no dedicated kernel thread, thus shouldn't > touch desc->threads_active. The parent kernel thread has already taken > care of this. No it has not. The parent thread has marked itself in the parent threads interrupt descriptor. How does that help synchronizing the nested interrupt, which has a separate interrupt descriptor? > Fixes: e2c12739ccf7 ("genirq: Prevent nested thread vs synchronize_hardirq() deadlock") > Cc: stable@vger.kernel.org There is nothing to fix. > Signed-off-by: Peng Liu > --- > > Despite of its correctness, I'm afraid the testing on my only PC can't > cover the affected code path. So the patch may be totally -UNTESTED-. Which correctness? The change log of the commit you want to "fix" says: Remove the incorrect usage in the nested threaded interrupt case and instead re-use the threads_active / wait_for_threads mechanism to wait for nested threaded interrupts to complete. It's very clearly spelled out, no? Thanks, tglx