Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp60996pxb; Thu, 21 Jan 2021 01:01:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLiulUHLAZiE6vupTllLiFI/Aw/GpJ2QnbmtQBhJSz2qz4isX+sgquNaDPUKNa67gCOHxW X-Received: by 2002:a05:6402:35ca:: with SMTP id z10mr10525811edc.174.1611219665656; Thu, 21 Jan 2021 01:01:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611219665; cv=none; d=google.com; s=arc-20160816; b=MvEp0IjPu/50+oZp7v9Fg/kxIs7i1YYko1GOSuuV8IniTVimkYZq+s4+2I76QEhV8q ieG56vfB/iabZ/WbnrkV9uXO5+CPO7xBwNVVgsdITVLaiaxiIW2u5jtW7zBfSyDQ0HQZ xN8GIStXEOR8l3lNmt8toG/s/rf4P/5Oz/A++R/i42FH+I+yJwHfrxMu+ISRzQfWwrRb 3AhhUXV1DE7kVUe7lYyvLvELRWLLZVqBg9OTLP7i73y6pP+NVD1db3MIkWz7CNC+Q44d dXuY3cZPVfGPtnt+SegW69MHnV+Iq9ETGbavoSCg5M3H0u42vHRX9bFZcpfq+o+fyB+v yMEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AhWpny/SB+6jNbdd1hfwu/17dcZy4EwlTfHrPvsIfas=; b=eTz4AC6Sp5i8EgEJ4LhCuBxhLh4NgWOxOJCNe/Mm3LRtdKFyZqdtF7doFebHwY3U6n G2+cPwXJ5ezHcppIpjzeO7mUaKx3t3MNRUk0XrYXkssYrQskqBWBDqcWzZxpcIycE18P dlaO1MaOyFF/PDfaX/ikVjMAdbAsixhHIh61x8vLGxsJlRZhCxQJwJeRpsWK1pYvetyo 9E+jD+/zIDPBUdJLqksKCMhvAwNEKC8hQqrGTXcQSzrTkbtRDO7098fnevomeR088vDE uc3gbfsImDzfFlG79H7NEEa9XxY7EZhHZZnjfJcnssXA0wRbKxRgSMuB/M87ZQ2FSIGh pubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VouRAkUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si1857111eds.299.2021.01.21.01.00.40; Thu, 21 Jan 2021 01:01:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VouRAkUK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728351AbhAUI7w (ORCPT + 99 others); Thu, 21 Jan 2021 03:59:52 -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