Message ID | b5a634f5fe1a89d42a7a4f91316f888b02ca576f.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 ib8csp3711723vqb; Mon, 16 Oct 2023 13:36:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMATXQWGe2R0ER5js0YrS1t3o8V2VG2qW93Rmz3t0uJKPndAhUqv86wjjCybAe/FFVvQuc X-Received: by 2002:a05:6a00:3190:b0:68a:6cbe:35a7 with SMTP id bj16-20020a056a00319000b0068a6cbe35a7mr253610pfb.2.1697488593602; Mon, 16 Oct 2023 13:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488593; cv=none; d=google.com; s=arc-20160816; b=fwTjj0a0tUOFrEEyk2ay1YxgSYVBV+ZpxK3zk0avNlKVgDCQtY9S0qQvJveNjOIRK1 IR5xg0a8heXO8sMY0MBbPl/QMXH9LR5UkHTlbyEMjlEwieSNbuXU62+eN132SlZ6qr0m 7QEzOizQBnomKh7tw774aZP55KKaHFa5fWtE1f2C75VZ+bB9xbMHz6PpalvkbBGjShaJ Yh9m3jJ73WxgB7MFZUbS6Wi2AXnu2cHcMe6d5mQXBDQsbI8N7OOVc6nHZsNH7BQezwm7 mV3fO2GEUxLagb5UDknlIZkgXdjl8rVa4S8MtGVEZIoIg1XyDjFcPYwfMtn7AE0w03+4 XkMQ== 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=tsMluF0Z0VBXaJsk17yfLaTyRhKMFfVCPd+72aI7zgM=; fh=d4z29RXO3jU5TBgADImj3VFDeAn0PRUJaPij0zYqvQc=; b=y8Fz5U46+Ch9tc53chbOyxpETqf2DEBFN0FuJBpJsIUCkBTLGHelWzrluurYNRL9UA s5pMzFr9WFgo+WIX0r6lrhQhoANVWQRIkzMNhukkthegqVH7RRecIkW6oADqudSyPw7a PK0yfh2flEVw/CzAtq4oAfn1bA6Ja9cgqyMQB2W17tCgzrLEH+JNZSY00AsyO+Um3uVu N/wJTubAMjkJaa8g006y+rAwgyfwIW3RI7zK/J704VbthRrKAvj163FB4GcHqlm4g/rD VvG2nbouvg9LfYCBI/fG4fLBIh2z3EsJ7+uEj3TVxskGkWAbgY2bQYT9dqmVxcgiUzsu 0Ouw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=lxMf2+MO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id bv4-20020a632e04000000b005898e10f9b9si122084pgb.213.2023.10.16.13.36.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=lxMf2+MO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 7F6788056C47; Mon, 16 Oct 2023 13:36:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234256AbjJPUgU (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 16:36:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234226AbjJPUgH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 16:36:07 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 025A0123; Mon, 16 Oct 2023 13:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488552; bh=9mA+IthVHwQ9TSYNjqEKDb8kf+N/Q7iDq28AtGEeciE=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=lxMf2+MOA79RE4VScijXoK8rNPHRW9UOeU2uTN7EM3YPwY4rpMY26E74YOCzDsc0Z miHGoe4GCcbE5k25IyGVdqMmWJxWZh+jogsXmzP5wnwDpOlQoEz8ZWQTodNwrq06fW GVNIsHHOzTflFS5iB1HYVf1kIu0pyLi6X5qxFwTgwLlLMF75VYilOd/IjwCMyMNQth Uq8ISe3D6PQvpknfDVmM7vPOrsSu8KpwvEfBGTRC9PiOEeHwkdQCEvk5pHYFqklOWJ Vu9zdP6SkVzUBVkaq+S2OUUtjBaG+CoHmFWm4rErLjAhDe/Dek3x0yFFEhZDSmsdHB UjarR9JexTauQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 44257FD48; Mon, 16 Oct 2023 22:35:52 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:52 +0200 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= <nabijaczleweli@nabijaczleweli.xyz> Cc: "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 07/11] kcm: kcm_splice_read: always request MSG_DONTWAIT Message-ID: <b5a634f5fe1a89d42a7a4f91316f888b02ca576f.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="3nezagrfhxjugaiu" Content-Disposition: inline In-Reply-To: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231006 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:36:29 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945799524740614 X-GMAIL-MSGID: 1779945799524740614 |
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.
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;