Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754782AbcDEDnO (ORCPT ); Mon, 4 Apr 2016 23:43:14 -0400 Received: from mail-pf0-f173.google.com ([209.85.192.173]:35054 "EHLO mail-pf0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752085AbcDEDnM (ORCPT ); Mon, 4 Apr 2016 23:43:12 -0400 Subject: Re: [PATCH v3] Fix OpenSSH pty regression on close To: Brian Bloniarz , Greg Kroah-Hartman References: <20160306061057.GA25727@adaptasaurus> Cc: Jiri Slaby , linux-kernel@vger.kernel.org, tsi@tuyoix.net From: Peter Hurley Message-ID: <5703344E.6060300@hurleysoftware.com> Date: Mon, 4 Apr 2016 20:43:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160306061057.GA25727@adaptasaurus> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 747 Lines: 19 On 03/06/2016 01:16 PM, Brian Bloniarz wrote: > OpenSSH expects the (non-blocking) read() of pty master to return > EAGAIN only if it has received all of the slave-side output after > it has received SIGCHLD. This used to work on pre-3.12 kernels. > > This fix effectively forces non-blocking read() and poll() to > block for parallel i/o to complete for all ttys. It also unwinds > these changes: > > 1) f8747d4a466ab2cafe56112c51b3379f9fdb7a12 > tty: Fix pty master read() after slave closes > > 2) 52bce7f8d4fc633c9a9d0646eef58ba6ae9a3b73 > pty, n_tty: Simplify input processing on final close > > 3) 1a48632ffed61352a7810ce089dc5a8bcd505a60 > pty: Fix input race when closing Reviewed-by: Peter Hurley