Message ID | 45da5ab094bcc7d3331385e8813074922c2a13c6.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 ib8csp3711682vqb; Mon, 16 Oct 2023 13:36:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7hio30/tGxpERFJLLqwmCwYA1c5/474wgN1yOue0ULO6vqPlV1mlj68F6zzFSHzoeDK8k X-Received: by 2002:a05:6808:183:b0:3ad:f3c0:5da3 with SMTP id w3-20020a056808018300b003adf3c05da3mr427039oic.3.1697488587507; Mon, 16 Oct 2023 13:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488587; cv=none; d=google.com; s=arc-20160816; b=TkNxeyVxveXwNwOF2R5PNEzMwpdTpMD4k5OAnErt/13FMyk8ZlFG9ljIg7C7eHjmiZ +ab69roblk72zLw8pk9OHbalgYhxTD/GaFED5fa/JaKpHAk0QZwTf73cZX923iRG9tSM 085x+cKDWuluKnAn9dTxc4ce/Lrgoh3KWeXF1KiehPnnBDoFTaicygCFY7/X+pEgsdIJ X4JB/scNXSaoI8NpWoOVULtTTEGRhTWZHSceaKceeuKUPwWxWAMt2m1ga7oqL2T8++kG aETrZ0GjK0u9SeVPZNonfBOrdighEiJtMc0EFv5h9Bkn2DH78b+DptrAbTysh5PyPlLd Higw== 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=XhEKfxYlxgk3agoDhPRaI4ZNYc3sN1RC3NsA3KaFSFI=; fh=M1YRlkczXeRhSvSXIx8NV0Om9XcgYKWRjfb7nZ2k/Lg=; b=AqQ4aCihzIJEpaSh6sNe9GSlN3q0c6CzRL1UT4/91ybYhYfUtmhIixln4/vgCIQwoX ZYymCXfwvm5QJLhhxckeEsqdJhSnYY6L8JDGyPU0TPogTI5qcH06zJtjNSMucva0b0sf xrU3Xl+ns4fbCTF1vUEjvdKHuzya9Piq8fN434bho2OlOc/sxebi1JA9Zb/LorW7+nyY G1tVVWkkRugd+of0F/DWa4LkCfanWqNgvA0lJArkB3+ISLRns010fGc6sHxXFgnhs7MF hyixB5JBgcGz+kNX1hAOaQ1ex4su3CR+0yLmqIL8g4Vmkmt+n2drTlucTYNZSW5/MSDL LyiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=NnbBuKeK; 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 a6-20020a654186000000b0057745b2d018si97635pgq.390.2023.10.16.13.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:27 -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=NnbBuKeK; 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 95D68802925F; Mon, 16 Oct 2023 13:36:22 -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 S234290AbjJPUgL (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 16:36:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234232AbjJPUgE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 16:36:04 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05108A2; Mon, 16 Oct 2023 13:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488550; bh=U1WgWCtmO/bEZ1AED24mCSnyrNXJpL+Y8jZtS7Uiqmw=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=NnbBuKeKpbCRZiKTZ0ErYxqllKdbeGYbOkrq7PCgezUnRSCKITL04C3B52B4ezIC2 qbWjx5knHEvFjx/c5qAQDFXWn4Gq1xy00JsQOD5qStbtjJ0JXZQP9eFmH4w+6qbKrk i++jePBXe+2YsLtyp8j/DCzzc/CrE87I4JuWKRcHLIaXzAL4BCGCTL7OLrEmTcZTlf /a4FJ6fSFhuU3Ow4xYUbIFIPmBMbTyDa/pzGfpK+kgNvBjOvcVPaYhy0A4hOmfl538 kFfoa8qrYOXCvCsZmeSve3t+x5tf85mAbx5H0jX9qIkYpcnSvoeHTkh4jbUMMJpHQR 4u9r4mx4oGR5g== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 298CE10414; Mon, 16 Oct 2023 22:35:50 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:50 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> Cc: Karsten Graul <kgraul@linux.ibm.com>, Wenjia Zhang <wenjia@linux.ibm.com>, Jan Karcher <jaka@linux.ibm.com>, "D. Wythe" <alibuda@linux.alibaba.com>, Tony Lu <tonylu@linux.alibaba.com>, Wen Gu <guwen@linux.alibaba.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/11] net/smc: smc_splice_read: always request MSG_DONTWAIT Message-ID: <45da5ab094bcc7d3331385e8813074922c2a13c6.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="47tcgm2g6sbkxgtd" 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:22 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945793182861719 X-GMAIL-MSGID: 1779945793182861719 |
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/smc/af_smc.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index bacdd971615e..89473305f629 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -3243,12 +3243,8 @@ static ssize_t smc_splice_read(struct socket *sock, loff_t *ppos, rc = -ESPIPE; goto out; } - if (flags & SPLICE_F_NONBLOCK) - flags = MSG_DONTWAIT; - else - flags = 0; SMC_STAT_INC(smc, splice_cnt); - rc = smc_rx_recvmsg(smc, NULL, pipe, len, flags); + rc = smc_rx_recvmsg(smc, NULL, pipe, len, MSG_DONTWAIT); } out: release_sock(sk);