Re: [PATCH 2/3 v4] devpts: resolve devpts bind-mounts

2018-03-12 Thread Linus Torvalds
On Mon, Mar 12, 2018 at 5:01 PM, Christian Brauner wrote: > > ChangeLog v3->v4: > * simplify if condition Ok, I definitely prefer this simpler version. We could simplify it even more, though. That end could be just ... dput(path.dentry); if (!err) { if (D

[PATCH 2/3 v4] devpts: resolve devpts bind-mounts

2018-03-12 Thread Christian Brauner
Most libcs will still look at /dev/ptmx when opening the master fd of a pty device. When /dev/ptmx is a bind-mount of /dev/pts/ptmx and the TIOCGPTPEER ioctl() is used to safely retrieve a file descriptor for the slave side of the pty based on the master fd, the /proc/self/fd/{0,1,2} symlinks will