From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:50985 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753957AbeEaI2M (ORCPT ); Thu, 31 May 2018 04:28:12 -0400 Received: by mail-wm0-f65.google.com with SMTP id t11-v6so52440279wmt.0 for ; Thu, 31 May 2018 01:28:12 -0700 (PDT) Date: Thu, 31 May 2018 11:28:08 +0300 From: Alexey Dobriyan To: Al Viro Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/5] procfs: get rid of ancient BS in pid_revalidate() uses Message-ID: <20180531082808.GA5113@avx2> References: <20180526000302.GK30522@ZenIV.linux.org.uk> <20180526000410.10804-1-viro@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180526000410.10804-1-viro@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, May 26, 2018 at 01:04:06AM +0100, Al Viro wrote: > + pid_update_inode(task, inode); > d_set_d_op(dentry, &pid_dentry_operations); > d_add(dentry, inode); > - /* Close the race of the process dying before we return the dentry */ > - if (pid_revalidate(dentry, 0)) > - return 0; > -out: > - return -ENOENT; > + return 0; > } ACK this. I never understood what race is prevented if process can exit after pid_revalidate().