Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4544204rdb; Tue, 12 Dec 2023 02:35:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcncfKsRh9Z4qzHEEXuSgNTdEI2bGYqBrlljstqGxz42hxFcwVW0lxtAFCxDkCn1j2u4s6 X-Received: by 2002:a05:6358:7f0d:b0:170:f134:9fc7 with SMTP id p13-20020a0563587f0d00b00170f1349fc7mr289994rwn.42.1702377355598; Tue, 12 Dec 2023 02:35:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702377355; cv=none; d=google.com; s=arc-20160816; b=tuAY2k7u3q1xWZCrqmPvHpY3d7wIn1SR1oyivOPT08Ow86QrQr8JxBhSMUMic++ypm x8tKJ3HCyWc4Z9fCRkxkFIHczIXLoUTf/mDZ5OjfFDfqVRjy6HQ20sVPoEeM5Cyoh7Ci DnvAhBVfY9ihD5GcntBkuCCxTjR6cCOmG2FqODzgMht2l6xV7SUBhFNDShZ2fw7twz07 0Qw4bv5iKJmA6QQhF1Qwl6k5hzo8kOh9zdLmCT1n31T3WzB5ecku8xPSxe/kadfRUWwf xqNU7w5mOsFDdM1in0GWZXJglmtp/KaIwtvuJb9oQs4v+eH2BlYXtmgJ7zJsKtkxssju VkfQ== 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=GvZLqtGiAD5HV6WRcuoSK/eswkcxzJEDfPXTlf1JP2o=; fh=vH294dK40jZtN0IvUTUHO0iQSmz9++711kFjPkjy0zk=; b=ri8/Eg61FzGaxFf/B57wms/H+djY6LQNY4W6QcpQ10PWykAHzOkAeZo3KZJP3+YalJ 3Y6eGiAPz8JCiS2tk1vqV84qfh3eDSMFnpTs64axKV8VPH4BVq7VC++P8xVnVvqNbdSQ r/To5rJVc0bbrmKOgwxF3souPXNjWFCJPcHaU+Balnzpc6GY+qIsk4TZMeGOsindPKT5 evvdlvNEp5UooIP/f6uMnaM3DVVki15rR+tvJ7XKiDx28TFp2YfW99gOtLkyBddvKMe+ wnp39a1zghmsIiS83uSLghPXzS+NPaXcLuo5YzCxP0F/LIiwGWkeLtKVqnTFrUkywa9N qpUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=nP2cTzGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w5-20020a17090abc0500b002858e8906e1si9087331pjr.99.2023.12.12.02.35.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:35:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=nP2cTzGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 2472980A1483; Tue, 12 Dec 2023 02:13:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235084AbjLLKNL (ORCPT + 99 others); Tue, 12 Dec 2023 05:13:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235061AbjLLKM7 (ORCPT ); Tue, 12 Dec 2023 05:12:59 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CC61136; Tue, 12 Dec 2023 02:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702375972; bh=9LoORs0/qovVA+ZuFnVynVHHVy98EiReKRC+P8F39/0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=nP2cTzGK93uab8yPQH14o6ln9eh/KHNoV9MN6Te0tHISKVXk5z5KPgksXxTIofUvY YgDGznUPcymXrcnLSO4HnyTwMODzQMY3WUzzvvehMPY7gI/JfZXkx06yiZBM1eHJYd mOtSGSlcWzY7A0HqYCRUr/By9lswuep07pBhj9mQAmnY1a9hEbU3b5p8bttVQ6SnpV LUdSjHpiRTjvg5RCla4TdpkmGA6Gn4RQONy0dtQbpk5kbV5nLm8sZtFp9V42S4DYW7 165rsI5itIXdfiJbZLVW3PFIHCxRLONRWyb5+lpUG2VVNZPfpdD1Cjeq3499C844xo tN8WXdYrbuBnQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id C5BE612A7E; Tue, 12 Dec 2023 11:12:52 +0100 (CET) Date: Tue, 12 Dec 2023 11:12:52 +0100 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: Boris Pismenny , John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Message-ID: <10fffb097b4d2b328ef16e7353d6829f1ec9efcae.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="hzayuiuiam5vzbgh" 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 fry.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 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:13:42 -0800 (PST) --hzayuiuiam5vzbgh 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. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5i= s2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemia=C5=84ska --- net/tls/tls_sw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index d1fc295b83b5..73d88c6739e8 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2145,7 +2145,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff= _t *ppos, int chunk; int err; =20 - err =3D tls_rx_reader_lock(sk, ctx, flags & SPLICE_F_NONBLOCK); + err =3D tls_rx_reader_lock(sk, ctx, true); if (err < 0) return err; =20 @@ -2154,8 +2154,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff= _t *ppos, } else { struct tls_decrypt_arg darg; =20 - err =3D tls_rx_rec_wait(sk, NULL, flags & SPLICE_F_NONBLOCK, - true); + err =3D tls_rx_rec_wait(sk, NULL, true, true); if (err <=3D 0) goto splice_read_end; =20 --=20 2.39.2 --hzayuiuiam5vzbgh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmV4MiQACgkQvP0LAY0m WPHOcg/9Hmw3zZiMpGDG/TB6uoRcTJMWlRCKmkmI+1ilwA1CWfHtlM9L8clPpR5V IqyDX8RszNuAAdY3bNCtz7jXxZ8Vw4ThcK9gO1MQDbeVCvo23vZfoGQd9quIwKcH Uombf2P9XhgGE/mMk2UgH2CJ4Hl6X0kUUpa57BZ4mh1CFRj6bBQOS027ju2z9jcC IfuYRvRLYMbY7A3dMmxgkhrWfEWn2unMZP1MWOlVl3M3c7pSIFoKi2LwgcQaYlrS GOk7xL6HhAsmmGIYCl4EPIDQb8xW0g8BOQj5fp+7//LhnCzhJmfj/JrKBsDDhRGr lCFTi9sr1fztkroWO5voOvt0t3A48P0t/0iPQk8q4qNtGnCvz+RzF2SuNaDnKRKW v0mQ6CIZLSQA8kGoSVnhUVZXEWYaZai9Pvb0nAsys2n9TbPV2MEIZFcCKxI0zA4a VnmsumXLV27OeCKrKvR2r/Z9PLZOzrgdmyhyDrlSFaIDM21Dl14WpJWfuFVATpUh Vu9DicrccbNi/dcTWzkP1KmpzrUIenQKQfKU98SrGiiSExTIYUw835h4cB4xtJrP aSJcv3U3p8sG8aM1nhksyRb5AspyDbmeeooFImAjpodW9L2irU9X7vWuqx5qLjvK pq/bL62pnjz7abRMC+ZpiWp9VmDmU1pSNE2BceSdD7nOyxVD3ic= =pvwR -----END PGP SIGNATURE----- --hzayuiuiam5vzbgh--