Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2745817rdg; Mon, 16 Oct 2023 13:36:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFk/auHmhP38xjIb5uy26S/gG9nbAqlKaVgQ8yKT856SPlfigByWGUbhaM9nI/e4BD2geWy X-Received: by 2002:a17:903:244b:b0:1c9:dfb8:a5a0 with SMTP id l11-20020a170903244b00b001c9dfb8a5a0mr538528pls.10.1697488570788; Mon, 16 Oct 2023 13:36:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488570; cv=none; d=google.com; s=arc-20160816; b=jto9jcG0ISI476P+PjScqhT7W0s1yCoXCNSUW+p5RzKKPPgQROvxAXWYcpDaTB1d1V VRNtB1nLbIQSzJhlNKywJ8p0xDAIDyrSLmCilRZsFX2D9rLzLo23yDzHKWFAURFPHfow r3Tjdc2sw27Qmuwz0xFm7VIrksjU7IAUGGYQdiJjPXAw2fJjPUamv9IXJBIApuCxtHjG r2UiMPsNAEXoczIBQJxEtWtlQW9ZGmkA5smn4Vm+2wkusoq3PhKtxPWzLplp1zN9F53z 5YpM06la726hvKS7pm+19ylxDhVB/tZhoZOT31+ve8yc0GaR8Sr3y7ut61Ac9zIAHmvf /lGA== 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=SRefprY6yJ5tR72xexTgLZXUPYS4P+5XsrKDsPMLGUM=; fh=f6HFdZcA60n/XG/EpAejijSP9wEAg+RXoH4FMOyV+cI=; b=I8GIFlpIQ5ACIGw1Ts07ihDj6GvVHC+5uMWif8dG9TfsU9zXB/zOYsVruESjB9ymYm 5F+Udx6NtgxqJDvx4gRPZ0MzOY9jh8tNTwYOUVfxHpjPHZT3LfbVXQdu11O7ruXD1WHO b5KW1G4G+ZdZtN6uMrQpFXkIFwqX4bN9SyW3cZjlQEHd1ph/Bw9f0AqTX+0Cu1QQLiaD IPMy5C3tQjYTkUzEdZfFiGlVQfdddt49g0g+VI9btrhnM54MmnG7rSW4LmML/GXyFWMA 9kQbA5G77Fv7BpLHALTo+AtSiwRtYmFoTAjRzoyCeJRZ6UYm2ENsTcaAfOAKA/MZEm5L LRdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=GWQMVXQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id t14-20020a170902e84e00b001ca84b9ce73si98104plg.446.2023.10.16.13.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=GWQMVXQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 376A880BCBA8; Mon, 16 Oct 2023 13:36:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234169AbjJPUfu (ORCPT + 99 others); Mon, 16 Oct 2023 16:35:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233732AbjJPUfo (ORCPT ); Mon, 16 Oct 2023 16:35:44 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF85CEE; Mon, 16 Oct 2023 13:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488539; bh=QIdiucrS3GrnXntvusWAnMhQFbLIMZWpsYTEgA0oZvk=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=GWQMVXQZ7y/HbCSGTSv83Wr3yTwhc+socxhzXVipZsxtx0T8JcxosbyMpIp3Lf8z7 JGKoumBA2EtRQkMukTFZR1ov6HnSh6vAOMfSSX8Qv3NG3x0SzdEfL6op9BJRNlrdit 8AE/gWj3NaT4wXWPw6kLwuuTLlvYsWwsqJPB4zMV8Ip+Gi8BNEAOdGvGp8rwKnnHXn fIUROjStWO6J0jfFr/Y5Z/t9Pl4LzAySsoxK597OsUEHrgCxdr3Eao51iJp55Bdz4J GF+q0YcnRS+Wrlqvkd6H9r/Figdls5+HeYs79FtkCRMTC4O7V3jlWQmzwQZRwL22hs GwkNuU8yyzSjQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id D38D610408; Mon, 16 Oct 2023 22:35:39 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:39 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Kuniyuki Iwashima , David Howells , Alexander Mikhalitsyn , Kirill Tkhai , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/11] af_unix: unix_stream_splice_read: always request MSG_DONTWAIT Message-ID: <8db45d00902da22ae25aa16a0c28bb41002fc039.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rszd4xwxhzlr2ybj" Content-Disposition: inline In-Reply-To: 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 pete.vger.email To: unlisted-recipients:; (no To-header on input) 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 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:36:07 -0700 (PDT) --rszd4xwxhzlr2ybj 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. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5i= s2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemia=C5=84ska --- net/unix/af_unix.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 3e8a04a13668..9489b9bda753 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -2889,15 +2889,12 @@ static ssize_t unix_stream_splice_read(struct socke= t *sock, loff_t *ppos, .pipe =3D pipe, .size =3D size, .splice_flags =3D flags, + .flags =3D MSG_DONTWAIT, }; =20 if (unlikely(*ppos)) return -ESPIPE; =20 - if (sock->file->f_flags & O_NONBLOCK || - flags & SPLICE_F_NONBLOCK) - state.flags =3D MSG_DONTWAIT; - return unix_stream_read_generic(&state, false); } =20 --=20 2.39.2 --rszd4xwxhzlr2ybj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmUtnpsACgkQvP0LAY0m WPFuFQ//RSJgctb0QfmDrNoHt0l9fqCJ7qs2IRUfTmE3JBSnwvfKCm8Jelz7qzp6 xIgixDpRNfjQi9fxf3mqnkV2vlSoktUE7uJQ43x742uVLD6PI3ZATjZuocMZpOgL 0HFJQhN5y+C7KKFmQPmgapK+uwyMNDDl4tfwS9JPrucOcfKfehhsHPZ+G94ZyiR8 4J9gmpdoHZrcJQeQth0v249B3P95wimjvYY4Ryb0Jx+/5Zt7eGcoJMDvcRAfKDps 5qRCQ2665+uqWToA0FQ3zIaoAwfCn4/mzO5CZXf+yks8MNFMnmqWPioCBoT8nErN YiXMESTrVOTVTJNaqCR/9uw5L/SNiwV7paUGfzwHgcuPeSeQ/h+QScGqufRHZ6c9 5iawZ349lBkypA+vfPmt+KDVn66eGeP2/z/LD0fKetzTz4DBIkVa8InPO+2kecqe zbKDrptCqTD+JYfdoKveZ1rEs+1dIzRjH88RVcsWxj3fu9vX8SDvuXeoBQa3CIuI QEuaJlBz58whkkL6c5HVBHxy5SGgAQ+U6PkH0DeMXQ6/QuqgsqLVE7MlueT3lExY Y2KOZDA8YKLHkxGPw8LmIJM9TdZYoHRjGKDVaBxtfSJ4Iwu0x94kOQNfqXRIDuMB hUAAJoo5YVbMOGqPYhESksdb6XPtLVLONwlrPu+4qyF4eCvxiMs= =dGfn -----END PGP SIGNATURE----- --rszd4xwxhzlr2ybj--