Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp172746rdh; Wed, 7 Feb 2024 00:57:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwJ65Lh+P6Ke7M/MZTsoqLsVCb21vLEfMWChFZrilVMNGCI4wPJiP5R0Lvm0uxe+hFi24/ X-Received: by 2002:aa7:d050:0:b0:55e:ed35:ffce with SMTP id n16-20020aa7d050000000b0055eed35ffcemr3742863edo.37.1707296231255; Wed, 07 Feb 2024 00:57:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707296231; cv=pass; d=google.com; s=arc-20160816; b=KPL0Vts15D6s7MsbT4uH5ql5EJAolEciArgjysHTkQ0c/KNXgKCzgfcCdefluG+MEE 0XKuw4WNSDIdKonZ5kDBYHLoonEDxvn5J3AK2v835yt5XU59NQE3RNMvwC058Vq2l+/g n39Fyc9304ZPqag6PnZarsEn7RW/IsqRiprSpStdhdqsi+i8hsRfAFabs0r/PnOxn2EP YvKfHSPFUdvjsIPrNMz0TI71d+VgJF5IyAjJTB3m6MAMiirEFX/4Y1AQwgXPAr9aedWD UKL10YktKjxKzR686wSrzahRcv7MBFkFVa2d77992PXV7BM7VH8ZsKpCMwn/3q1VA+Li kgAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=Cw11tU0VBRruxrN1e+mgjq5TANXcEy5xBoaByuvofkc=; fh=jV+L6j/GvEyRanGuZHmJTX4LyZyXYbZBMWK9QfXNloM=; b=ssrpuTCU9gHMPAUU96bZlH1VPof71La7H+cnRSucBg34vyZYvm/i14rgJVidQ93PC5 oGlIPQSZYD3wOqTZyd7GMbbmXPrEhGchos+Unx+vIBV/oLwY+aZBe3aMzQk15okuAitV I8PaGko8y+fExn48K0qk3kh49tzGrOibN1ki1uVlw/gPt3hPtc7kSE1NVW4G0u6H0+jj MBxEekEc+sSRGzhILhFhGTQc9HutkXDEVGh9k3XQwHvqyQl9yTDgb6xcUf+Q06q5LQ1o dbx5Fqcwh7MWY1418lzypqVEFXa+LQdctAHT4t7vGQvc9v8MXNY5lMVsDgWIsth78TEn ikIA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CJvTgf5S; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCWNQJpJoM08DcCMDuKgV7pIMnzqmwc1Q0mjMyA5bXI7eruwoSEWdgzu20QDbCp5yx0WLJHHK75F2db3bgcH9ERxSs2zdwT4PMbx1E9PJg== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id d18-20020aa7d5d2000000b0056054177f7fsi638553eds.635.2024.02.07.00.57.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 00:57:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CJvTgf5S; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-56140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2D6A41F22EDD for ; Wed, 7 Feb 2024 08:46:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7599224CA; Wed, 7 Feb 2024 08:45:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CJvTgf5S" 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 07ECF2231F for ; Wed, 7 Feb 2024 08:45:20 +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=1707295521; cv=none; b=mwMkYxm5k0aN+bhzzWLL+YsM13v1zMjF5JReTjCHFEfxduOZCLqanWBT3PqSE8TN6xq+NqvqUcXpTiWCWEHptl+ZQKbNrPBuR5D33tE47hm5r0sAB4sj/cj8dNWW8z1C7xV0gTJCDXwxy+wkH6ny8cSQM11dC90EM5yrxi687lc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707295521; c=relaxed/simple; bh=x6TOK/SXpEcwBQEsj61MJOdrAEHzqaKovzCOQhEVAwQ=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=hjZHaox7y1/ML47SWCJoEJFSbNSrEMz4x+o+6fKf0PncyvUZQpgxyXk5MK9nPRihRQix7khp3FqneEKU6n9Ks354OrE88GZuABn2vJlv0+ewpzK4i7CvR7zsOC5/07rx5D8E5iTk60hfnY7sn4Hw311uK5BW7o/2nvop07U0Rs0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CJvTgf5S; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EDFF5C433F1; Wed, 7 Feb 2024 08:45:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707295520; bh=x6TOK/SXpEcwBQEsj61MJOdrAEHzqaKovzCOQhEVAwQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CJvTgf5ScE12wPa8XCNLRmT/HPUpSk1SHiBCCoPWym5MQ3IzDApPRzNAmKqhx0eXN JisO5k4g19mymyd3jN5e1PXqBL3X2iwMoOehOk6mNCi/Ymnbh0MxIL4LLdrmcpY5Pk zdaln3g1l+NCYGsSPCcOmuiK3t1lR9ktO9FahgYWbfktTe1P+MobzSkziC36EHE3X8 bI10NCn0NwzeQTLs3t0cu0+pHoHuVzoQ7HQDrRKBGRzc8jXZZdVcpm2OgJRHbTteao MqLfj8w8cNxbhJWpWz9gWJ4I6ZVcjc47p/I4RLmwUspP6hf7YMTYdYF33uEVILgl38 kCUyiTQc4H8HQ== Date: Wed, 7 Feb 2024 09:45:15 +0100 From: Christian Brauner To: Tycho Andersen Cc: Oleg Nesterov , Andy Lutomirski , "Eric W. Biederman" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] pidfd: exit: kill the no longer used thread_group_exited() Message-ID: <20240207-fenster-strotzen-b31de9bee30b@brauner> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Feb 06, 2024 at 10:04:08AM -0700, Tycho Andersen wrote: > On Mon, Feb 05, 2024 at 06:43:47PM +0100, Oleg Nesterov wrote: > > It was used by pidfd_poll() but now it has no callers. > > > > If it finally finds a modular user we can revert this change, but note > > that the comment above this helper and the changelog in 38fd525a4c61 > > ("exit: Factor thread_group_exited out of pidfd_poll") are not accurate, > > thread_group_exited() won't return true if all other threads have passed > > exit_notify() and are zombies, it returns true only when all other threads > > are completely gone. Not to mention that it can only work if the task > > identified by @pid is a thread-group leader. > > > > Signed-off-by: Oleg Nesterov > > Reviewed-by: Tycho Andersen On Tue, Feb 06, 2024 at 10:03:41AM -0700, Tycho Andersen wrote: > On Mon, Feb 05, 2024 at 03:13:48PM +0100, Oleg Nesterov wrote: > > rather than wake_up_all(). This way do_notify_pidfd() won't wakeup the > > POLLHUP-only waiters which wait for pid_task() == NULL. > > > > TODO: > > - as Christian pointed out, this asks for the new wake_up_all_poll() > > helper, it can already have other users. > > > > - we can probably discriminate the PIDFD_THREAD and non-PIDFD_THREAD > > waiters, but this needs more work. See > > https://lore.kernel.org/all/20240205140848.GA15853@redhat.com/ > > > > Signed-off-by: Oleg Nesterov > > Reviewed-by: Tycho Andersen I updated the trailers with your RVBs.