From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B7CEC433E0 for ; Thu, 21 Jan 2021 09:00:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8766239D0 for ; Thu, 21 Jan 2021 09:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbhAUI76 (ORCPT ); Thu, 21 Jan 2021 03:59:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:35764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727290AbhAUI7U (ORCPT ); Thu, 21 Jan 2021 03:59:20 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0609422473; Thu, 21 Jan 2021 08:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611219520; bh=iG/p8IPpLy3M6vDZscRB0uVFF8bOLLGuF5E029FCRrQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VouRAkUKPYjeh8sVdry+sMtFaKD66UYrlb5pmdczL+3C2bDbfha/9Ls28ZPBax5OR biQOdQjkxceiGUlwCD/eqlFL825Qh+Oiz7bGr9Ln75yFLwEQRUxsNLDBB0juGLv0ZM Nhhrd+pytYDRHCeyrL02S18sXLUEDXeUzboOBfcU= Date: Thu, 21 Jan 2021 09:58:37 +0100 From: Greg Kroah-Hartman To: Jiri Slaby Cc: Linus Torvalds , Oliver Giles , Robert Karszniewicz , Christoph Hellwig , Linux Kernel Mailing List , Al Viro Subject: Re: tty splice branch (was "Re: Splicing to/from a tty") Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 21, 2021 at 09:50:39AM +0100, Jiri Slaby wrote: > On 21. 01. 21, 2:18, Linus Torvalds wrote: > > On Tue, Jan 19, 2021 at 8:44 PM Linus Torvalds > > wrote: > > > > > > I'll come back to this tomorrow and do the line-buffered icanon case > > > too (unless pull requests pile up), and then I'll be happy with the > > > tty changes, and I think I can submit this series for real to Greg. > > > > Greg, I don't know how you want to handle this. > > > > I have a branch with my tty splice patches at > > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git tty-splice > > > > and that now includes doing that "cookie continuation" thing even for > > the N_TTY icanon modes. > > > > It passes my local tests, and I did try a few rather odd things. And > > Oliver tested an ealier version without that final commit on his load. > > But... > > Hm, I would like to review this first. I noticed the changes only because a > new branch appeared when I grabbed your tree and the branch has "tty" in its > name. > > So for example: > > > @@ -1038,18 +1045,15 @@ static ssize_t tty_write(struct file *file, const char __user *buf, > > if (tty->ops->write_room == NULL) > > tty_err(tty, "missing write_room method\n"); > > ld = tty_ldisc_ref_wait(tty); > > - if (!ld) > > - return hung_up_tty_write(file, buf, count, ppos); > > - if (!ld->ops->write) > > + if (!ld || !ld->ops->write) > > ret = -EIO; > > else > > - ret = do_tty_write(ld->ops->write, tty, file, buf, count); > > + ret = do_tty_write(ld->ops->write, tty, file, from); > > tty_ldisc_deref(ld); > > if ld == NULL => crash here. > > So can you send the patches to the list and Cc me too? I'll send them out right now, I've already merged them to my branches. greg k-h