Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4544146rdb; Tue, 12 Dec 2023 02:35:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHLOtvOu4wD90/m7FtDgz+JzkFS8KfscNVqt49Y36hniJnDb4432S/H2lUyRkcnPIkRcrsM X-Received: by 2002:a17:902:f782:b0:1d3:41b6:6d83 with SMTP id q2-20020a170902f78200b001d341b66d83mr154594pln.11.1702377345394; Tue, 12 Dec 2023 02:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702377345; cv=none; d=google.com; s=arc-20160816; b=KXpe3rR+tm/qYF/rNTI6ibGgOrKRmCPh9gWpuH6j65GiD3xY41h7/rYNe6sZAkVmq8 odHxGIg2xh4SfbjEa2NDTs0r2TyZdG5QGz/7cWrRi32DfmvTXyyyI5/aXK+Dt8RYaRWU pO2/++uFVYwJISSBv5Jm+Ftn/2j3a3rwkvSHCeOyqtQoOX4ecekgnp+7522UDPCE1tV3 sOcf7pGvcLDTkbPuuuBse6rGukRxR41h1WUoRnFHXc4LIdi+hatRoyCN4ejC+brg3S4Y 7EA4mtOEzHZSlX5qiJsewO3LWQfPVs+mpGcAMQffrMooU517PTD97fiugPGs9O9qa6YC OWgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:user-agent:message-id:subject:to:from:date :dkim-signature; bh=A1O/4e9vEQAIjGbeCRFtsv1F54E0Y/A0ofQaC63Gu00=; fh=FKsHAEOkN5oNsabLtwd95oXqpBlzSJ1ELRHiC0E/PQ4=; b=zJAuTasYSz3njwWZcndh0kW/2Q/elEHI6ojZEXhsO0IgCcDjPPbYGXJMFud7f+79Hr toda+VQ4mZcFAp2MN/C6PAXs7lYmy1TPrgKOLkRcfe7u1trFTPh12u4wF4GxGZT4wQyc G6BW9RSp1rX+02l1NEqpUeatkzorKgVZDu3BEog+Q63+200FqRTdDhb2iIoCH4gRC4XA 2orEuC+ZB+K7UwjjiHaWgGdHZnBhZ3DaNBjXRJZKZH70Meud77H3hPpvdINw2hghrVcC cupu3JDZliJhCam2uUE0MkSrIM0u5AeBedPqy+GUUYm1JVFOfZTg14aoYW2w3JHIJ87V Qeiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="FP/x56Va"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b13-20020a170902d50d00b001c73626a1ffsi7777238plg.412.2023.12.12.02.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:35:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b="FP/x56Va"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 880818054B63; Tue, 12 Dec 2023 02:13:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235128AbjLLKNE (ORCPT + 99 others); Tue, 12 Dec 2023 05:13:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235081AbjLLKMs (ORCPT ); Tue, 12 Dec 2023 05:12:48 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40871A6; Tue, 12 Dec 2023 02:12:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702375970; bh=2AjQrGaQE2NFW95434lGTrYs+KkaIhT6LEOqbOxH2XE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=FP/x56VaAun1w5xQh4Hbyto20YJcWvMPD8ZHJrjx09XvBZpzreHcprde2BPPiSh7f SQuMPVWIkB/XlJlmO/ZMy9/NkqwPeBkxhBOgq/Os2QPd76qII1d85tKFxrzZo6P5Kw mEDW8Q1Awmc2bnP1OriY1L3lCYWjiYq+OMzr39ZsDheSA03CkQttrMXVht5YxZlfOT YMfM6YJeCVMog+IDXMi9842zVLG/4+MIvnXjeCH6SCpyRcKIFGcmBZagddZ6tVPNDA UmSuSbr4RGo703hrZ0pwHZIE+F3Opsci4hPL0LmlwNCVbKlKBI+n/xdo2U+EFw1TKZ r/jmVHoz08amA== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 6961712F70; Tue, 12 Dec 2023 11:12:50 +0100 (CET) Date: Tue, 12 Dec 2023 11:12:50 +0100 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Howells , Shigeru Yoshida , Kuniyuki Iwashima , Cong Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 07/11] kcm: kcm_splice_read: always request MSG_DONTWAIT Message-ID: <1b5a634f5fe1a89d42a7a4f91316f888b02ca576f.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="o6m7vcrodirufcvf" Content-Disposition: inline In-Reply-To: <1cover.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 agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:13:19 -0800 (PST) --o6m7vcrodirufcvf Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/qk6hjuam54khlaikf2ssom6custxf5i= s2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemia=C5=84ska --- 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, l= off_t *ppos, =20 /* Only support splice for SOCKSEQPACKET */ =20 - skb =3D skb_recv_datagram(sk, flags, &err); + skb =3D skb_recv_datagram(sk, MSG_DONTWAIT, &err); if (!skb) goto err_out; =20 --=20 2.39.2 --o6m7vcrodirufcvf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmV4MiIACgkQvP0LAY0m WPF88A/8Cwu5xFnT8lzogF+KQQJWPL/NZUg1v4R0N/+/Rxeod3dWRDlUTLVZuADF YdsrcnQSFXwYgneyxpPXdNnFmFeXfQCk45srdVOH2IfDd98TH0p+kaDgsXim/4Hh kWx2uMbLD+UMlHpXnDgNWS27pYPznsW8VcaloTpR2tbO5cUhyilSPrcWkF/M/jPi sD3OEgsJEUwthaScjDXqRYgZdd4NW91SZMEb/YLNVEbrNX4/Q/ziI1WV99TafgHA Qf41y1icGsF8hkUS+SbYUJLrUxZPh+LoQDy5B7cjEtJQNDNqsZEW5eEoDQGplwHE XZBklW6FkMEtI1tDobp0PAvtn2IF7reCpH7rt7Adin5FxWHjqDfFsRyIOLxSTH1q 5nJVk/2YS2RBIJiHRZgREER82tmQxkO/a/TNgWEo1xuXWbPTyuNjI+Ae4maY8ncN S4zaDzo01JCsEs3loyCIN3a9plKhVdweLyux+k3zTKjjLOdCDV7JTt4p40Qg7ALh a+uwVd7B6eb9ozpDp9F/xK6/0osROu6pIZwhjsI20ECT3vzJeDmGR05n2+FWE7tN UUaPG5bimmzif6TueAjUUivT/DRCuWVG6/sBd18S7QrLWZtodTsHtDGws2y+L/O4 jujfUWJZMGqa27xUWSPQZNz2NRZ+eyBO5BzUB5iYV4msFLi8HeQ= =766a -----END PGP SIGNATURE----- --o6m7vcrodirufcvf--