Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2746120rdg; Mon, 16 Oct 2023 13:36:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGdxffzwBQrOphMtEUMMABjdoK0bgVPE4A040GpoJSUaP4i+wmsYC+M40LgDc6sdsiT8iTj X-Received: by 2002:a05:6359:1a47:b0:143:1063:d1f4 with SMTP id ru7-20020a0563591a4700b001431063d1f4mr516770rwb.13.1697488605229; Mon, 16 Oct 2023 13:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488605; cv=none; d=google.com; s=arc-20160816; b=mkHpbDg2xd9UpHg+8Dr1ZMi6HDk7spwK2Pn0fr8VQ3i1R5zjc0wqYveVRppjGGM7H6 KlZiCrNoukFHb84wDONvnC6mHKR+AExwzAEEEt2VNo0THnqa1JvliT5PQFqt9HoMqVss Bf80HG0o/ps/+kQ4VNRd+P+kk5ra2pEkjtCFeGwzOqOrUYFrFr3prge87aA0mBtNhKMv P+ts2MKW2VO359Q3il57k2NiSZw+MejvSM314GLmUren+LeHGkdf8JA0FOHUE8gGwU0L PZnq8smOyct6VSFDUhm3dgVi/xIx0JzLxvreimxBqjEibU8tR2lVigdIdWhJ39a8D+KG LHfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=2BVd4gW1amvRoJvl5VvpLuR6Ry0NDgNbTlD5jg3Pjbs=; fh=Oskmylf92gQgoWcJVK2DZkdbYki3SlnV/gEzpmChMXQ=; b=mYvBH3nyp6RQX0Weo9voqUKAFafDWQZUsM6sCk1g2bWLOxZPcXeP8oQmE8KX+ynHBo a+Icd8ffVhZpUGmRjmhwJ0priBJEfeq7Nvjk+rCLaz+a5jochocnLA6ciWFsL/YOgM61 Bx9wMwUOtHDPJNibYHo9CpoHoo6qUUAvmvB0XAL1S+I/myMf2YaTPeqVDfWLhkPVnu9I YBvV7eNjnNXk+7FUEyTpKXNwMGZ9AycQzSKUHTJx8dz9xepOIj9YmexKyErCajo6nDOT aKOg+xne/BP2cI1VsHJs/XqpcYVbm6owuQ7UrNFFSDV3uLH0wLqK+UkwZdutw8qE8Bcz k9wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=C1tqd1IU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id t1-20020a634441000000b005aae2dd62b2si104344pgk.527.2023.10.16.13.36.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=C1tqd1IU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2C6B78028FCA; Mon, 16 Oct 2023 13:36:44 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234394AbjJPUgi (ORCPT + 99 others); Mon, 16 Oct 2023 16:36:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234308AbjJPUgS (ORCPT ); Mon, 16 Oct 2023 16:36:18 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01D7119B; Mon, 16 Oct 2023 13:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488561; bh=GkcnvUcVpOCe5CAn1FqxU2g9Mal7SpC32VFF9WWd900=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=C1tqd1IUfTUwcsTencFYK4ZinxRZ0QuZ2dZaoE4ARNPRyq9gW9vWpdT8w5ibyI9IO r/FM5jS6XvZd94ewaBp3MmdkRCL01YlZZssVYT41RzBlOUuSwQmqV+o25Ai1oqf73g whBgvc+ZQIe1ix40Z7jL4XY9W38v3Z3RqOdHieeMFPqJmKEnGktgj7gqgPU8eFoxmn IucbGc2OFlHummOanDb/K4JlQDjB2Lrog6jG0eHqeDRjXWJq25q7gLNGnW7fC69FOK cZaaNZmMMW+ARrhcgZtdy2gtZEiAZ/iNRHUwVcZRPlnB2HWc4b5sja3KX4egmRmtL5 DhT5tHfmd/Wsg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 6EDA4FAF2; Mon, 16 Oct 2023 22:36:01 +0200 (CEST) Date: Mon, 16 Oct 2023 22:36:01 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= Cc: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] splice: splice_to_socket: always request MSG_DONTWAIT Message-ID: <813e1805aa942862d300bec4d0563c5a466dce78.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4tuu7g3cnuobllgt" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20231006 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MISSING_HEADERS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:36:44 -0700 (PDT) --4tuu7g3cnuobllgt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Signed-off-by: Ahelenia Ziemia=C5=84ska --- fs/splice.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/splice.c b/fs/splice.c index 81788bf7daa1..d5885032f9a8 100644 --- a/fs/splice.c +++ b/fs/splice.c @@ -869,13 +869,11 @@ ssize_t splice_to_socket(struct pipe_inode_info *pipe= , struct file *out, if (!bc) break; =20 - msg.msg_flags =3D MSG_SPLICE_PAGES; + msg.msg_flags =3D MSG_SPLICE_PAGES | MSG_DONTWAIT; if (flags & SPLICE_F_MORE) msg.msg_flags |=3D MSG_MORE; if (remain && pipe_occupancy(pipe->head, tail) > 0) msg.msg_flags |=3D MSG_MORE; - if (out->f_flags & O_NONBLOCK) - msg.msg_flags |=3D MSG_DONTWAIT; =20 iov_iter_bvec(&msg.msg_iter, ITER_SOURCE, bvec, bc, len - remain); --=20 2.39.2 --4tuu7g3cnuobllgt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmUtnrEACgkQvP0LAY0m WPFaiw/+PYxS4XTUis48aaacFF5+UetcG8qMihZRg51JtDxWGPZp4BjlVL6pODGg tCRTmD6NsG5XDSeKHSKx0TRSmY+aBTtEmxlg0HvQ2etwqGBgbiZ7JR5PI8oxtr7G LbMaqhTeLfE8u62NfGYM37mCRLbQcVam0pjcKH/JlUzJhdh8lnzvrqTfzF4T1Mhb jM42T3cy0Qq0kG0BWI2mSH0cBuklkb+2I6SiEIRSjZsqQxawCxavVve5JAQYfCDZ eulH5r115uagSiKcZIec2qfywUv9ATUZ9Lr71j8U4YBsfIh4uo/kSjtZcrHCxmFc weUWiweg3VTHfdHmIUOMWZ3Yt4zwNzf6v3gK7e3glYBiFLYuAU/NqKlkWBJVGLJy wBEf0L/vf0z/DQJPOWgLpqSbVelNjgiA0U6kTggLy6QImCHaCKqti+0mj/JPGsWn P63QY/wyxtI/bmaMOhp8mNovo1tZnr9L9liXcLhkBA70eROu8OIyxlFT1Cm8ueKM NNL3vixRal7Lz+Le4YcbXzSbfkf9OGf5qVFzGL0UY4YmmlbaBB4WEeE8RwmPT3QA Zf+WFnYoCH7x+QKSUWmAXNgrHPADtk1qG5RCrMOuBcqEEq24vPC14vje+ZFxXLDq 3xJPtVnNQrzwrTsDr5Syw3mg8tV2/yGAtg4DTkX+jxsgDmuFDVg= =alCd -----END PGP SIGNATURE----- --4tuu7g3cnuobllgt--