Message ID | 2b5a634f5fe1a89d42a7a4f91316f888b02ca576f.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:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8768764dys; Thu, 14 Dec 2023 10:47:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEDYWOEaWnZrZVXjx+YghuiqP5ZUoZiQP1lJ1kIGfxMr7xfSHYRMsW760NCyt/F6spZWtR X-Received: by 2002:a05:6e02:1746:b0:35d:9c76:b459 with SMTP id y6-20020a056e02174600b0035d9c76b459mr15371218ill.49.1702579652272; Thu, 14 Dec 2023 10:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702579652; cv=none; d=google.com; s=arc-20160816; b=Rqbe7xUs0AdfBUCK6qaBcfa7RCXw4aBr9950gLvYc+fR5nNB/BOCgzbMnarh9i3uQa FgwPvSpNqbdWoYQl0CDT6arKvMwi8kr8uyDK38Mu7IMy3AtJIkDZIqYDRbQTrtyHezCc sVVZajaWxbZAcboTZpTQryG9lB0gJnbwGiABDudMcXsAhoEoly75a4SMp5/VKg8AcDGf AnznTW2MOiO/9W7f5e2xXDe40UJotH5QRha1GTrlOy4IYBnMq4QL0xj9cztQQ+i59K2d bjf/uEycdkxk6xpYSrd0E+HRKPfhvzsdxptv1M/dVVGLssOhx9ePWsOFNi2L8wBJqcRL BC0Q== 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=60SEHpBlCV8nUJ71oCSEat0ahXp0qowsGHTwfQ2kQL4=; fh=vfFnS2j/tZWGMKMD5oFcr+ruqIoHrt3Oeto31ugfTBk=; b=segfbR81sckGXeOodj/tDa9gpBQ2qxaQG72wNeVnzTF4SMzBe4m5zvzgvhmC1VtkHQ Hs02SG1jUycYE0sV4YJf6pCDbSkpTDKggtQCeIMGtgjEYqJlR/79er2HG7GnOFu9lJgk AmJynC7+Hfg1cne6m2tLy2HEAemCSNV0HtRYOZLdGMwNOdhVil71VORqphQNwtXbXUZT UeeKsWi+hqtWHW5SElA6aCCVy7EA8A28m66vpQjY/ugwk78DXz3zf2xJR+cMfpmNyUQ6 LIPVVxnJh4Z0sxW9ZpjZjOA2jQ9s0W/5Nl3Of+oQS7pXoggnA7Ef/4vfZl/d72UFbGv+ E2QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=FbIkGS4v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id o34-20020a635d62000000b005c688ff3462si11808989pgm.585.2023.12.14.10.47.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=FbIkGS4v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 A93208297C7E; Thu, 14 Dec 2023 10:45:34 -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 S1573459AbjLNSpZ (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 14 Dec 2023 13:45:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235780AbjLNSpM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 13:45:12 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C8CB1BE; Thu, 14 Dec 2023 10:45:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702579510; bh=3+ew1mEY+zwZ0CgM50WSpaK0xitBcIbGALQyFKzLJsQ=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=FbIkGS4v0GUxOMwpZJlneptUHxBKSzYD20ioLXKT+HVtqpA11z5FLvS89fMve8Aqv 5xkcim+9Tp+FuZqGQF+CI1uoQunfcooKH0/egoYxEC/lpEZtIpb/amxrbGsg9O0lQJ oGEFWBoO4XMANVAisRqrU0DNdWSM8hFr+s7vD4wBR3FZdU8Geg4O96DieeuesbNtxC n0lR5Bor5RQhxzoDOKX1XjnT5qW/LIzZqfqlWWOL+0CY4wBDSyL891hHBA7dzTELif 2hEzt+A6Hzh7ezQ2o9bGKKK5mbK/XXl7mmTfLS1s034e8DS4Bbvwe/XrQpfV5tjxol ZfQWcSieBFsIA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id E966413796; Thu, 14 Dec 2023 19:45:09 +0100 (CET) Date: Thu, 14 Dec 2023 19:45:09 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> Cc: Jens Axboe <axboe@kernel.dk>, Christian Brauner <brauner@kernel.org>, Alexander Viro <viro@zeniv.linux.org.uk>, linux-fsdevel@vger.kernel.org, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, David Howells <dhowells@redhat.com>, Shigeru Yoshida <syoshida@redhat.com>, Kuniyuki Iwashima <kuniyu@amazon.com>, Cong Wang <cong.wang@bytedance.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RERESEND 07/11] kcm: kcm_splice_read: always request MSG_DONTWAIT Message-ID: <2b5a634f5fe1a89d42a7a4f91316f888b02ca576f.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: <2cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="whdhopzeizlay4jq" 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 morse.vger.email 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 (morse.vger.email [0.0.0.0]); Thu, 14 Dec 2023 10:45:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785284161730739271 X-GMAIL-MSGID: 1785284161730739271 |
Series |
splice(file<>pipe) I/O on file as-if O_NONBLOCK
|
|
Commit Message
Ahelenia Ziemiańska
Dec. 14, 2023, 6:45 p.m. UTC
Otherwise we risk sleeping with the pipe locked for indeterminate
lengths of time.
Also: don't pass the SPLICE_F_*-style flags argument to
skb_recv_datagram(), which expects MSG_*-style flags.
This fixes SPLICE_F_NONBLOCK not having worked.
Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
---
net/kcm/kcmsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index dd1d8ffd5f59..de70156869e6 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -1028,7 +1028,7 @@ static ssize_t kcm_splice_read(struct socket *sock, loff_t *ppos, /* Only support splice for SOCKSEQPACKET */ - skb = skb_recv_datagram(sk, flags, &err); + skb = skb_recv_datagram(sk, MSG_DONTWAIT, &err); if (!skb) goto err_out;