Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1463442imu; Mon, 5 Nov 2018 22:02:16 -0800 (PST) X-Google-Smtp-Source: AJdET5e18cGapCLxNlA02ibj71OMNcrlOKnpNw4Yy6jzo2/tDw62/sxiKmwi0Laa3YRBOm+zWJn3 X-Received: by 2002:a17:902:b943:: with SMTP id h3-v6mr23643284pls.124.1541484136829; Mon, 05 Nov 2018 22:02:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541484136; cv=none; d=google.com; s=arc-20160816; b=0voqSMXmSehcel+2bxBs8KTgwmIcLVPBTastco6BY7P9bevXOp+n8HwjicYeI8TMa1 VoeDl0N/o3MHZtOw/8j+KMHDF7tvatvBTTm0gMDa5j5A2C/6ou+epkTERPGguis1oauS 0nYIZoLSrEmxKz+pJGt1Mm5ELXdMxSd7IiGBekndXpKLtev3lSYlMvdqhhPd/R/gPfa2 QaCHg1foNyhKZegxV+xws75DLATs4rPu3m8yVdaTddSyuMvvjDfyomRJTVRNvB2bWE3n iw91ZgDfT15bOoKnHEUUoIX0rfOTC+QUg5GdkKyT//te2I9+ZThuLXArnXZ/m5T/J1q6 FdPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=OQ7mMwDjxb5CZGXIZ9NGZj0J14jIcW1p3V8PwIp6NJk=; b=BEyGwgvgYtsx6cqQVSyh02LZ268cpvEPyyMqeFqzzMBuBLweunTjLTn63yCpFKxJV6 BWOssiWCzzBKB3LDDR8Whzz335nz+X2JZtebVf3qV2+9z/bQYgzLE5mbKxhjFwdMO2pL 5TVWrkN14BrLTiXhIgqdTpYHzbfecijjQwiHRFvXedxDreCOVKoZRkoYHZBIsv/ilLBY rKTNbKEGtnc0VuFi4GF1vg3hSJRw9Jyze8koZmKuGGSycUjqCNto2bolA2KNCmfMAM5x XYQLG5bz/oOF9gpKbGu0PFK7R6zfQQ8yNc/2ySrU7c7tYNB67PEuRIuMYOEcs0FSNqJs gcJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14-v6si1669599pgd.282.2018.11.05.22.02.01; Mon, 05 Nov 2018 22:02:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729945AbeKFPZA (ORCPT + 99 others); Tue, 6 Nov 2018 10:25:00 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:55246 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729878AbeKFPY7 (ORCPT ); Tue, 6 Nov 2018 10:24:59 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wA660RTf132575 for ; Tue, 6 Nov 2018 01:01:25 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nk5a981pm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 06 Nov 2018 01:01:24 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Nov 2018 06:01:22 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 6 Nov 2018 06:01:17 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wA661HO761669434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Nov 2018 06:01:17 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ECBF94203F; Tue, 6 Nov 2018 06:01:16 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9E1B042047; Tue, 6 Nov 2018 06:01:15 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.207.135]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Tue, 6 Nov 2018 06:01:15 +0000 (GMT) Date: Tue, 6 Nov 2018 08:01:13 +0200 From: Mike Rapoport To: Daniel Colascione Cc: linux-kernel@vger.kernel.org, timmurray@google.com, joelaf@google.com, surenb@google.com, Jonathan Corbet , Andrew Morton , Roman Gushchin , Mike Rapoport , Vlastimil Babka , "Kirill A. Shutemov" , "Dennis Zhou (Facebook)" , Prashant Dhamdhere , "open list:DOCUMENTATION" Subject: Re: [PATCH v2] Document /proc/pid PID reuse behavior References: <20181031150625.147369-1-dancol@google.com> <20181105132205.138695-1-dancol@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181105132205.138695-1-dancol@google.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 18110606-0028-0000-0000-000003137CB3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18110606-0029-0000-0000-000023CFC2D7 Message-Id: <20181106060113.GA4499@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-06_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811060052 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 05, 2018 at 01:22:05PM +0000, Daniel Colascione wrote: > State explicitly that holding a /proc/pid file descriptor open does > not reserve the PID. Also note that in the event of PID reuse, these > open file descriptors refer to the old, now-dead process, and not the > new one that happens to be named the same numeric PID. > > Signed-off-by: Daniel Colascione Reviewed-by: Mike Rapoport > --- > Documentation/filesystems/proc.txt | 7 +++++++ > 1 file changed, 7 insertions(+) > > Moved paragraphed to start of /proc/pid section; added signed-off-by. > > diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt > index 12a5e6e693b6..0b14460f721d 100644 > --- a/Documentation/filesystems/proc.txt > +++ b/Documentation/filesystems/proc.txt > @@ -125,6 +125,13 @@ process running on the system, which is named after the process ID (PID). > The link self points to the process reading the file system. Each process > subdirectory has the entries listed in Table 1-1. > > +Note that an open a file descriptor to /proc/ or to any of its > +contained files or subdirectories does not prevent being reused > +for some other process in the event that exits. Operations on > +open /proc/ file descriptors corresponding to dead processes > +never act on any new process that the kernel may, through chance, have > +also assigned the process ID . Instead, operations on these FDs > +usually fail with ESRCH. > > Table 1-1: Process specific entries in /proc > .............................................................................. > -- > 2.19.1.930.g4563a0d9d0-goog > -- Sincerely yours, Mike.