Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753246AbdHXSbn (ORCPT ); Thu, 24 Aug 2017 14:31:43 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:35958 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbdHXSbl (ORCPT ); Thu, 24 Aug 2017 14:31:41 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170816171211.4021-1-christian.brauner@ubuntu.com> <20170816194805.hnof3aqiqykwki7p@gmail.com> <87pobvruzt.fsf@xmission.com> <87ziazqdfr.fsf@xmission.com> <20170824022436.44adb497@mir> <87378hhi3y.fsf@xmission.com> <87wp5tfynr.fsf@xmission.com> <20170824062432.1e05e6f8@mir> <874lsxezal.fsf@xmission.com> From: Linus Torvalds Date: Thu, 24 Aug 2017 11:31:40 -0700 X-Google-Sender-Auth: F6sPNelCHEMOwDUSJUKrg6ij-TA Message-ID: Subject: Re: [PATCH 0/1] devpts: use dynamic_dname() to generate proc name To: "Eric W. Biederman" Cc: Stefan Lippers-Hollmann , Christian Brauner , Christian Brauner , Linux Kernel Mailing List , "Serge E. Hallyn" , Al Viro , Thorsten Leemhuis 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: 656 Lines: 21 On Thu, Aug 24, 2017 at 11:13 AM, Linus Torvalds wrote: > > The attached patch should work. It's Eric's original patch with > various cleanups and fixes. No, one more bug in there: Eric did + case TIOCGPTPEER: + retval = ptm_open_peer(file, tty, (int)arg); + break; to call that ptm_open_peer(), but that's bogus. The "break;" will just cause it to continue with the tty ioctl handling, and result in -ENOTTY in the end. So it actually *did* open the slave, but then threw the returned fd value away. It should just do a "return ptm_open_peer(file, tty, (int)arg);" instead. Linus