Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp654620pxb; Wed, 3 Feb 2021 14:22:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJz906RFs/7UjlPkFAKzAu/TQ7hHTh3jHpyHfyzyPc0cWxsnl+7Q447AG94MXMbVOP6OvY57 X-Received: by 2002:a17:906:a453:: with SMTP id cb19mr5331154ejb.459.1612390959641; Wed, 03 Feb 2021 14:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612390959; cv=none; d=google.com; s=arc-20160816; b=LCWgRd6V6xiIPz9T5aMbS9W7oAL5AQrR+8kNdex0S5I+NTxZNTLceMktY0QLowFbWN UUVTvAveUYEtrnOWlLX7x5q0ym8Y0JzVkk2Cg7oeGUyYxP4luuEDOuVncHhpy/0kb32f nqAzIxes9w70khsyo3zMY6ek+tf1EWMRH3IUsvsJ42ekodmvqOOLqS4mtfSNV3K195zP jNPuYtDjpLg6m2QIoA9X7cK4xqbyK8ljWthIlz6RUMndntDBPsOj0ZValwXvw5OVLmcI q6dm9kea52CQ33pGJ1Y6nmc2KGLgQ8sVuZqXqHY22aJSn3K0NUmFefl5FSIzTpmZj28L UmhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fwKwcjkOakabuMC8IDDuvslB5j91FzNr2ME4Ak/U/ps=; b=uP7U1rNIvZ+/DUnCwAqEVycRbKgGXTq6bfh2PCFCWjaMBppKV9LphFfxeL7vqVMgjj HfUjmceCGLayckfwVWssQOSBM1a1IuciYz3ySr3uO4VW7iLfZ6f7mXNqY+BB6aF3VAKV 2U7K+nWnX0CNnKhMEP6Su1A/ayl69dahVKtytuLMsy1XDjLXp3qi/EoMZHCUaUq3BcgG ERjl4XVrGfgdafyoPl6pc4RvOHfCi4C96Kqw5KGXjiSjCE6mAh3kvFgMOEbtjrr5Pzgq hffsX6ER1Lxe0q9o3YEwpIF43V71MsWSCZIn5gSMEuJcSEsR5DTFgETXGGJ5iF5IShOQ TVxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V5L8auhb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si2180333ejr.344.2021.02.03.14.22.15; Wed, 03 Feb 2021 14:22:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=V5L8auhb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232220AbhBCWSL (ORCPT + 99 others); Wed, 3 Feb 2021 17:18:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbhBCWSK (ORCPT ); Wed, 3 Feb 2021 17:18:10 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09C5AC061573; Wed, 3 Feb 2021 14:17:30 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id m22so961945ljj.4; Wed, 03 Feb 2021 14:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fwKwcjkOakabuMC8IDDuvslB5j91FzNr2ME4Ak/U/ps=; b=V5L8auhbCPrs/G84QeTojaX6uGf030RjbQ/EHQpDA9BBU7ay28h+u1Yt0AjcJEsPJd /YO0xAMPgKvxqnqYh67F5qEX9gwUrYgsEDvxg2AkPheyc/em2Gz+bKtJem0VcUAhFO8x Rr5jnVRW7+e4QfMjp4dGYgCedjvP2MFLa9UDcRcNblPfW0wtYT6aEE5bajWeIbWMIyRu qr+vBSAR21aCXAti7QHDpnoa3Q0en3k3ictIAF/sk/T4dtxtshxdx4zIys9zxuIoR3oM dC6VJfjJoRDI+mNzvnfuW0BWHER+9vA5yb9UhLygriS3GScTyjm4WZixMKJ9IFJAIW95 FLcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fwKwcjkOakabuMC8IDDuvslB5j91FzNr2ME4Ak/U/ps=; b=EOumvuG/iEzmihnI+kUPfEqIepqWNkBPFUSQ1yeJO/cHuaVL2x+oFHP2RvCZdRurDQ LvkQ9iQ5Dp+SD7zsB5lRomN6jCnAVGRJCmakKdrlw67QEjQoPAd1etaGQNPlgEOf0KO/ tppAqek8+UfVj6omHZi+Ne+e30i/fL/X6tO3KTLyyj7ImIYxr5G/7VPmU5jKCBOfAVY7 ogPKPGVo1v6pqeAgbf/2Px6Z2cpmrkkh1HtNNREHNqKY9+CzLn2fIfue8NlB7spea2Tz cx4t+JaOf5WnCt2YM2IcnpAtyQ88vhBCrqoA5+fLLS+MMjMBareHy1VwdVu2WFcR08nA nNmQ== X-Gm-Message-State: AOAM533VVKEsgspawJkCd1DAuzAZUiEmBEUEDKM9NXkE8xQsg6NZiQao kEdH+OlC5mbMh5dABmMHKHE= X-Received: by 2002:a2e:b543:: with SMTP id a3mr2968626ljn.336.1612390648430; Wed, 03 Feb 2021 14:17:28 -0800 (PST) Received: from grain.localdomain ([5.18.103.226]) by smtp.gmail.com with ESMTPSA id g27sm362995lfh.291.2021.02.03.14.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Feb 2021 14:17:27 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id 64ABA560097; Thu, 4 Feb 2021 01:17:26 +0300 (MSK) Date: Thu, 4 Feb 2021 01:17:26 +0300 From: Cyrill Gorcunov To: Pavel Tikhomirov Cc: Jeff Layton , Jeff Layton , "J. Bruce Fields" , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Andrei Vagin Subject: Re: [PATCH] fcntl: make F_GETOWN(EX) return 0 on dead owner task Message-ID: <20210203221726.GF2172@grain> References: <20210203124156.425775-1-ptikhomirov@virtuozzo.com> <20210203193201.GD2172@grain> <88739f26-63b0-be1d-4e6d-def01633323e@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88739f26-63b0-be1d-4e6d-def01633323e@virtuozzo.com> User-Agent: Mutt/1.14.6 (2020-07-11) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 12:35:42AM +0300, Pavel Tikhomirov wrote: > > AFAICS if pid is held only by 1) fowner refcount and by 2) single process > (without threads, group and session for simplicity), on process exit we go > through: > > do_exit > exit_notify > release_task > __exit_signal > __unhash_process > detach_pid > __change_pid > free_pid > idr_remove > > So pid is removed from idr, and after that alloc_pid can reuse pid numbers > even if old pid structure is still alive and is still held by fowner. ... > Hope this answers your question, Thanks! Yeah, indeed, thanks! So the change is sane still I'm a bit worried about backward compatibility, gimme some time I'll try to refresh my memory first, in a couple of days or weekend (though here are a number of experienced developers CC'ed maybe they reply even faster).