Message ID | 0fffb097b4d2b328ef16e7353d6829f1ec9efcae.1697486714.git.nabijaczleweli@nabijaczleweli.xyz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3711716vqb; Mon, 16 Oct 2023 13:36:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHq5+2uK2q2UkCEr3VohkGqb8jq+LfH831Y0rXQXajb0rP4DftRzXbwr8qVtMqrdkCQfNSG X-Received: by 2002:a05:6830:4598:b0:6bd:6d51:e9e5 with SMTP id az24-20020a056830459800b006bd6d51e9e5mr356624otb.0.1697488593015; Mon, 16 Oct 2023 13:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488592; cv=none; d=google.com; s=arc-20160816; b=rlm7ebtMpvJRMlTETYQvsVRMqKZ607n+GdgSwD73NDekiAJir0A1TwwjvCjybnJICJ GWps1dtt5aZKUb6b/UegdDAEXRLhQKiQoALpgkygVYZWrpRHvlY+gpf6Yl71X2AB0vQR mrYv6fCnhFlgwIEcIHFJgc0Yqsr0xhQXPV7eacwjtojm+MhwaAo+zVUfbUktWhDRX2Jz IbW4s5zCyMBiEshaZdbbZ0LWRDcYFPJtrnpb5UMPa42wTMXZ11tZO+v9V5MYt+wr3sOC vlaHK7GhClxWQrfV5F91BwlrXiGd83iyNjBX9qmOlto/3ft6asvpOmiRsoGzASmmhSOr IOIQ== 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=SgVhm1POFGpo3yXYdwLtSO+R9fgppxSkqOFJ/Zl4G6g=; fh=aZmxRmvxoZlw0aVEwWHxGAsdH6sZcaq11OJRQV3SbRw=; b=bnSzKmwbzOlvLoX+o0t1ny4rA8xlThdyEdpSuuYlOESkjN1HYKtPtxDPEcOCCS4YaT xaJYBcrVwUc020rMicuAPkh6HJBokZ8nO8aiXKDh7WflgQTJQ8e7D7+16WFcbJURcp9M wOaKKEIQ8aO5ugKnrDhOMLBeFjQxeWZM0MR6OcsyuN2mGcAqBx0Gu8+i1A49LaH6Jh03 v26YJLMLsQI/19zi60JRImJ6uWQXQKoLh5zNjY3jx7pesOIZRQT4rIWggZcqySAJGvat dKGVPgDv/cxp3Pw75LYwOKLC2U021OfHoltof57WkV44dMlvS28jSSHHCgg9lW+pX49r HCdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jRVa45p8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c66-20020a633545000000b00577fc59373fsi110141pga.296.2023.10.16.13.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jRVa45p8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 06E8C8029234; Mon, 16 Oct 2023 13:36:27 -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 S234299AbjJPUgM (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 16:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234248AbjJPUgG (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 16:36:06 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498FD12D; Mon, 16 Oct 2023 13:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488554; bh=yKqnk4KdW1G8ysN8p/704fCo5DUzCZ+wWpZiakGmbbc=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=jRVa45p81I96MvAlHdov6fY8gT4VGBQoFIRSUCCfB6WfpqB46snLFIrXqqaC7D6tx qx2WoDz18lqvDyrYgQPZ7oxDzQ2bbLlGebQ6bmYjgr19EHMJNHV3ldO9ZmbLTSwp+f v6Ap2pIY0JNAwg6ZvUFfel2aFzlckL8o+bJkB0nfxwmtwHWGxZajW2/jbAhncs0CPx bv/5EUD++wYozIZLaSDlMF1luRAfwWuBv3NwS73kWGYk9IsC4meal1ogWUNtAzayYu 6SFiFSRvno0UvsRHN7hQXxVgmV8gmznX4kmKJjG5Of33d198+kPS4HHIeyO+AL2rQW UcFqRDvfltF1w== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 7910D10418; Mon, 16 Oct 2023 22:35:54 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:54 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> Cc: Boris Pismenny <borisp@nvidia.com>, John Fastabend <john.fastabend@gmail.com>, Jakub Kicinski <kuba@kernel.org>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Message-ID: <0fffb097b4d2b328ef16e7353d6829f1ec9efcae.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="73zfmjpwwsl4usws" Content-Disposition: inline In-Reply-To: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> 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: <linux-kernel.vger.kernel.org> 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:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945798902264229 X-GMAIL-MSGID: 1779945798902264229 |
Series |
splice(file<>pipe) I/O on file as-if O_NONBLOCK
|
|
Commit Message
Ahelenia Ziemiańska
Oct. 16, 2023, 8:35 p.m. UTC
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 <nabijaczleweli@nabijaczleweli.xyz>
---
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;