Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4540143rdb; Tue, 12 Dec 2023 02:25:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IFliSghoe1ni65yWJvRpy3yps+SlPDa+8wJawnNTODWQBx2MJVZm3MIdYjFo4Fr1boa/XYE X-Received: by 2002:a05:6359:7414:b0:170:2abb:ed37 with SMTP id va20-20020a056359741400b001702abbed37mr2765852rwb.21.1702376754200; Tue, 12 Dec 2023 02:25:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702376754; cv=none; d=google.com; s=arc-20160816; b=HaAzKFXXKDW4VJb16GAhdpj5Uly+8a3ErZB0yeRlBJWeqKxFoRj9zTOXA6Vw7VEtJM gDtl4xT4nYeK8mxXT/utqjHiTIGizZw8JXrczpeFulBNlq4mnpxpYgimL1OzT0gj/gfN nVX64I1NkBsUxt8ukqELtpwTAjGal+SY98osIeoUHBqTWFqSA53JFkSwImLLQu1B7SZo yKg7WPfJgVYqZhl66lNLTQ+0qD1L2jhRro4cFyzE+mKCyJL/T4rOf6PzSfloLld7hOns kSFB4tgls4C8yVBOlDSET+Bl+kM22/KRuWGBo10VIqLSM/szgu3OKHc/U3N4ExqwBtbh FFGQ== 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:user-agent:message-id:subject:to:from:date :dkim-signature; bh=5mz8uJ1Jsk8cOqVftZwAGmeY14BRr9qL2mwu20mVO3U=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=gNXWVYLXvxlMqNr79NblJZ3V+Hf8PnmSQPStiYJ0ycUd1s6WU+q8SB0htvDMCIWC4T sMUDsR4CY5J7RJKjU4xtEtja+0q6Qo+g6fgNNxkUVzVQOSW6TsGK/dD3FdpVTHsQoiOF OClyXHBlgdYZbH6ltIgPahbLW4CDTeph5t04keE7CISt68AekEiSdZ+SGsJCth61QgIh 2gcQzpjy8Ip4eg848AplzY7NysDhzG05TBslSu3VIrWHz9GKHBzhkboHxZ986FISBzIS U4uLdLH/TVov5EGAztcxKRveh869uolTF4EtjRsjKBkRjTheRwPnqNSNPQ9QiOmmGj3w KDFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="PWAYJ5/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q5-20020a655245000000b005c602ff4068si7259402pgp.438.2023.12.12.02.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:25:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="PWAYJ5/7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 2317F80219F8; Tue, 12 Dec 2023 02:13:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235155AbjLLKN2 (ORCPT + 99 others); Tue, 12 Dec 2023 05:13:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235110AbjLLKNI (ORCPT ); Tue, 12 Dec 2023 05:13:08 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38125D6F; Tue, 12 Dec 2023 02:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702375980; bh=n8Tz0tvGMgfdPFnvnOzQj+h8yUtCIOndgwGis4T/GEQ=; h=Date:From:To:Subject:References:In-Reply-To:From; b=PWAYJ5/7wGUdmHMz7N8QIQ4ekEIZwUOQDYzI8AfNrITIDjbYq/1SNBNUO6W2SXSRv hHzG6JjeJdhYvhET3HtOFwVx7kZpYdfNJb0N4PNZ4Lf5NS72RwZWqsE9VCRHUT4uNd VU8uSlJz1K+dzahePgbnKs38jkUTqmiYE7P3nYtFQWaCygmhG32bYliYjHHmTlG1KI mdDKFVuCqnSLSBu2vIkOS/9tA8a1SdrvQL1HJMFNmq1Va+zTspvwE0iEUB2pP7/5l+ ff1OarfhS7x54MiYVFBlTqGta7IxiFzcLEVZeR2JDhYw0QUu+LL1fi2GoLbRIoy01Z 8/hsDv3xIzpdQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 4061D13784; Tue, 12 Dec 2023 11:13:00 +0100 (CET) Date: Tue, 12 Dec 2023 11:13:00 +0100 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 11/11] splice: splice_to_socket: always request MSG_DONTWAIT Message-ID: <1813e1805aa942862d300bec4d0563c5a466dce78.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wcobgse6hj3ubesx" Content-Disposition: inline In-Reply-To: <1cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:13:46 -0800 (PST) --wcobgse6hj3ubesx 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 --wcobgse6hj3ubesx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmV4MisACgkQvP0LAY0m WPGwRxAAs6fr478UQ2p25vI1thcEvzX4w5WUOAwBkLcqvY9dMJZ7vZTzRqlmIFnO IiI7kNBIre5AaHQn8I2d7YQddxrurwLLa5MkuvdfxSRzOt3lU6jsZotQKCg1pAmh vJqsRNkQk0n0w7HTsx/xBTYFbw73DiJGxYJrdYdhhd7W66rVCr7lc8SuOPXG67sG ngKc80p1H3XASjYpXHuKSF//z0QNRPZt/YbSVNFFMJ0CjJoIb8XjOsPvtVSnl7Hq iVOE/mpqDpsBuibIVk/iPTWYRrt0RiHl7jIMcTaEpr5AZ8T0kn4wapEbISmBxhU7 Tn5FH3QH76qSZWBrbD/fuh1OTdQbqUDlCSSwOS44M3Y3Indafsor+8D+RxpY46Fl 9BedCQqc+dPTNtEeL8R1b6PUn7BPug0h/M+L7U3TT1burIAqgmaGGaqIK49Pps8Y c1pH1bx4BWWB4F75amTC+A0uZEWCKnA/4BORvMTpATwBnsPOngznOREP3yzoNoiR 1QdmcJL7YAs52Nq219+RM5CEJhQqA1Y6vGAHA2WWOMsoue8su8FhMO/SL9dafcq+ Tvw6BW1jnxUdeOOK5I4eOwzTIi8B7FoJNk8O6E5I9YWwxPPk79v6MnICMKVCNcSQ 4BIxIGjVD6EhR6GowE44L19F8GBFkiJKe8Lx/iOyW3AyLjUElBM= =NDdt -----END PGP SIGNATURE----- --wcobgse6hj3ubesx--