From patchwork Thu Dec 14 18:45:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 178871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8767625dys; Thu, 14 Dec 2023 10:45:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWKXVdfgKf2lXB51VVab7ZOlQ8hFxhEZsUI/zgBwWUcRFvuv/3mxrT9FElHs6CMcHKmg66 X-Received: by 2002:a17:902:d50e:b0:1d3:3b52:d9a1 with SMTP id b14-20020a170902d50e00b001d33b52d9a1mr3191049plg.55.1702579545596; Thu, 14 Dec 2023 10:45:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702579545; cv=none; d=google.com; s=arc-20160816; b=bL6J6ZclFj6k7I8Qo7DF3oKUf19BHOT/NgtyYFvAawyU41K3EwiEMYMXmWNGRAmxRn aJZiRgyZwkb5Y9GpBsmIqASlvTi/fzwP1skFEMdYCQcaNgsvTJlwMZhttMSpSVNdoJml cECFVtHd/H5xS4NbW8zN+0ciZSnEZG6p9Ml6/WEeMMD7NSg1wd45bBVu7LBC6eK2PcTQ DJbqoqsn871zxSeRQqG3dMInSY5C+J6WrWQ/ZWJKiewo6VZXZLx2KNUEvi9pSzsbKyq5 Sv5MJfQ+JhLswuDwA9UhoUwWYSjUQKn3kC7NVHsYdo+dHnBMKWD0SANfbyTB9+WIU8WI nlbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:in-reply-to:content-disposition:mime-version :references:user-agent:message-id:subject:cc:from:date :dkim-signature; bh=mLwneLI2aeyLsDJV2JC6rAzMvUe9ZIz5kNnM1D3ksTI=; fh=bNwnBjfjGpO1h1FrY+Uq+7YFuXKkFQ87MIqd6dDlHZc=; b=z4pA5M8tPV93UD7mQY2TCu/C5A1pPdK2HhdBIQNnUpU985cIpx636COUFhirXyj+JW 2OFnVj2EoFmtc3ob7UQk6XnqrKiylvYw36Bn6388fmJWPyAU4gQzLTwj6HF0H9KUZPE4 eJIkXaqwsxq+N3C0pVe79AfTHPYCxJoAuuoFI/pMtdkBNEmF3oE9y9TGAz/Ueg5CO4aL v03vGQffRjTEu5wG+o+RY7s7haGrYFCO91TIWZlv15s+Bf9Xq+t3x9hykk+ucRfF5d4H HmjUSj3G+pWviKZ8Uj2F7Hwfj2XQhOX899JNdSXyGh7g68uFw4I2ZzCj6imW9esg3XLM SUdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="N/WMy1GY"; 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b6-20020a170902bd4600b001b7d2b55d8asi11367357plx.626.2023.12.14.10.45.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:45:45 -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="N/WMy1GY"; 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 824EC8068C78; Thu, 14 Dec 2023 10:45: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 S1573509AbjLNSp1 (ORCPT + 99 others); Thu, 14 Dec 2023 13:45:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235787AbjLNSpO (ORCPT ); Thu, 14 Dec 2023 13:45:14 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0808D4E; Thu, 14 Dec 2023 10:45:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702579512; bh=8SccJBZdD6aVuGUXwvyxv46MttfctOjmM7x9ll4fJrw=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=N/WMy1GYhBqMQtyaK8cwvSxySt3AQyoSakF9rLNn/iXCBzqLaY6Gx6+A8KcCQvv5J snP/AEZA+0N/NiLDcCyBcOAtEWNmIuUx6aMCFbfOSpMEFLHmYjcA1Ya+QP0EL5ZymD vRBoWppY3Xhbn96WzNi4PoKiRsKtXuGBxyJ/GawKf1ktklPLVA8+btLH92qCV2NMDX gGY4KaHQvSXsl0zVsFwYJa5MAfbaz4VNtDPouHcTdYCzXbYqXA9l+ZXF47QKv7iX47 4cx7gwZP2ko1pSazp5XgCA1XK84jiA8M1WWWjOi4LCT4AYQWFzz6wItyYGuk2ZWqvS zOnez67wb8xLA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 4A9031398E; Thu, 14 Dec 2023 19:45:12 +0100 (CET) Date: Thu, 14 Dec 2023 19:45:12 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= Cc: Jens Axboe , Christian Brauner , Alexander Viro , linux-fsdevel@vger.kernel.org, Boris Pismenny , John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RERESEND 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Message-ID: <20fffb097b4d2b328ef16e7353d6829f1ec9efcae.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: <2cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2cover.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 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 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 10:45:41 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785284049587268648 X-GMAIL-MSGID: 1785284049587268648 Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia ZiemiaƄska --- 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; - err = tls_rx_reader_lock(sk, ctx, flags & SPLICE_F_NONBLOCK); + err = tls_rx_reader_lock(sk, ctx, true); if (err < 0) return err; @@ -2154,8 +2154,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, } else { struct tls_decrypt_arg darg; - err = tls_rx_rec_wait(sk, NULL, flags & SPLICE_F_NONBLOCK, - true); + err = tls_rx_rec_wait(sk, NULL, true, true); if (err <= 0) goto splice_read_end;