Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752421AbdHPT4x (ORCPT ); Wed, 16 Aug 2017 15:56:53 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33273 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbdHPT4w (ORCPT ); Wed, 16 Aug 2017 15:56:52 -0400 MIME-Version: 1.0 In-Reply-To: <20170816194805.hnof3aqiqykwki7p@gmail.com> References: <20170816171211.4021-1-christian.brauner@ubuntu.com> <20170816194805.hnof3aqiqykwki7p@gmail.com> From: Linus Torvalds Date: Wed, 16 Aug 2017 12:56:51 -0700 X-Google-Sender-Auth: ZrkO-ZeAzOzX4MUw_vkZJejIaNo Message-ID: Subject: Re: [PATCH 0/1] devpts: use dynamic_dname() to generate proc name To: Christian Brauner Cc: Christian Brauner , Linux Kernel Mailing List , "Serge E. Hallyn" , Al Viro Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 18 On Wed, Aug 16, 2017 at 12:48 PM, Christian Brauner wrote: > > I thought - and sorry if I'm completely wrong here - that the proc name came > from the open(const char *pathname, ...) call. No. It comes from the path associated with the file descriptor, and is expanded from the dentry tree. Which is why you get a full pathname even when you only opened something using a relative pathname. So the fact that we _don't_ get the right pathname for the pts entry here means that something got screwed up in setting filp->f_path to the right thing. We have all the code in place that _tries_ to do it, but it clearly has a bug somewhere. Linus