Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752492AbbLMT1w (ORCPT ); Sun, 13 Dec 2015 14:27:52 -0500 Received: from mail.sig21.net ([80.244.240.74]:39473 "EHLO mail.sig21.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752174AbbLMT1v (ORCPT ); Sun, 13 Dec 2015 14:27:51 -0500 Date: Sun, 13 Dec 2015 20:27:40 +0100 From: Johannes Stezenbach To: Peter Hurley Cc: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/6] n_tty: Fix stuck write wakeup Message-ID: <20151213192740.GA17772@sig21.net> References: <1449958599-5533-1-git-send-email-peter@hurleysoftware.com> <1449958599-5533-6-git-send-email-peter@hurleysoftware.com> <20151213151823.GB10204@sig21.net> <566DBB0A.5070108@hurleysoftware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <566DBB0A.5070108@hurleysoftware.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-21-Score: -2.9 (--) X-Spam-21-Report: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9 autolearn=ham Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1581 Lines: 42 On Sun, Dec 13, 2015 at 10:38:02AM -0800, Peter Hurley wrote: > On 12/13/2015 07:18 AM, Johannes Stezenbach wrote: > > > > There is a related bug that I meant to send a patch, but I > > never got around because the issue was found with proprietary > > userspace and ancient kernel. Maybe you could take care of it? > > The patch might not apply cleanly after your recent changes > > or might even be invalid now, please check. > > Thanks for the patch, Johannes! > > Yes, the patch below is still required to prevent excessive SIGIO > (and to prevent missed SIGIO when the amount actually copied just > happens to be exactly the amount left to be copied). > > I made some comments in the patch; can you re-submit with those > changes and the patch title in the subject? Or I'd happy to re-work > it and send it to Greg if you'd prefer; just let me know. Please rework it, currently I'm in lazy bum mode ;-) > > @@ -1991,7 +1992,7 @@ static ssize_t n_tty_write(struct tty_st > > break_out: > > __set_current_state(TASK_RUNNING); > > remove_wait_queue(&tty->write_wait, &wait); > > - if (b - buf != nr && tty->fasync) > > + if (b - buf != count && tty->fasync) > > ... this can be > > if (nr && tty->fasync) > set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags); Yeah, that's way better. Thanks, Johannes -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/