Message ID | 28db45d00902da22ae25aa16a0c28bb41002fc039.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 c4csp8767568dys; Thu, 14 Dec 2023 10:45:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHi2mpiYDQchrsXpvzVboJhAdC//T7zAcFfD1SopEoiBTyQwpRCJ3kxW0G5Pmdm619jApPK X-Received: by 2002:a05:6e02:1c0b:b0:35d:5995:799a with SMTP id l11-20020a056e021c0b00b0035d5995799amr16420757ilh.52.1702579538854; Thu, 14 Dec 2023 10:45:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702579538; cv=none; d=google.com; s=arc-20160816; b=q9LyCivLF7H5w/fAhAI5Z8AKK38vcRUrR0OAbnCc4ydwrE3rj4j/cjGybiZy73Walj scT4wxpp6I4EFm8iwvtgMcn8ze8ZgSmN+wsPOzXsYzW+Lb6cnd3vTVNeDG1Imer1clir zJOLC1+7zHQl6Saq+TUSaU9supuZrDQLbokxqqR6OER9szkrLoJ/uZf/GcKWlZGrKmMG P078jgcGhDnU3mPXUAoGb2KOgwhhQayidW2aaO5MSV2fUDapwaaWs5SSkzgn8MFRDg9W 7Fn22k+pz7EQZ9N5nXmIAtNtAR/i2M4TNfW826pzYs40e6RpZglBn+0zv/uPJSnL8sPt 3j/w== 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=x8bEUWoPDkRpF2kz6JE197/SX2DupoE53xKypnn2fAE=; fh=Q4wcddOPlxwOEVKjzpwPQdn3QaX6ZS/SLpRqgg6nyPw=; b=duy4RA68xMMUB7dBFf3OVH1BUvDEH8wu6VpvN3M3k1LLTDblBrAOvi6qi3ghWNunO3 R87EnDChAUhoM2abYSXwophg9e5FKAX64mFbX4zBG+m7SyNIt7+U/8/VL9GjCF8lHYsp c80vzS26WjMakEMtaHIE4QLwcRhCmXn4U4EXGav+AJdPG0verZ60HWB9u53Koh9FAerp xFxgS96qo6LID8KyBM3qt1mIO3oP5VDoC1Tm5G4eqtrn184xIm62+idLygvRx4RlaIPX UDN7L3UfLp+TXSLBcujOVTGLJyUHUMdrcAe2Ay0vSWaZOZ4F8qipwp39zJ8F8Kb+gCfo M4Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jHdrVrI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id s15-20020a65644f000000b005c21d7d1126si11708209pgv.843.2023.12.14.10.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:45:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jHdrVrI5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id C1B7E80FCC97; Thu, 14 Dec 2023 10:45:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573132AbjLNSow (ORCPT <rfc822;winker.wchi@gmail.com> + 99 others); Thu, 14 Dec 2023 13:44:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573139AbjLNSou (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 13:44:50 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A816FB; Thu, 14 Dec 2023 10:44:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702579495; bh=HdTsxawUqvYBqho9F8qfYgYlmOiA88qfknRMSXgij6E=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=jHdrVrI5NZyeYt+K+FSO9zKM0tTA499Q1cB+K1dvZbIIKwM7zi+hpj7wvgNZmr04/ Sk2dELl2jUoSWvLp7A//4WuKVr9z4rEy6PqFY+LNOv2V8M5X85ffyZVWN220/NIS0b sA8JDl5dpah4bnW1EfP+RGorBMlQS7cqtym4B0dJf0P3xjtQIlVQLYwOFz+kA2jCaO YTKGUs70Ox8ei/67BnYdwOvclbIkAw4uDSy+RI29C7qaj/1jsUepUUC9PjUCrYqque /mQgTIETwDiVnv6YFez8wCuWMviss9E/QVpmxhF1DraMXfnLgMoVhj1quE7+9OMfAo itv8Acm2JtGWg== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id DAF0B13272; Thu, 14 Dec 2023 19:44:55 +0100 (CET) Date: Thu, 14 Dec 2023 19:44:55 +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>, Kuniyuki Iwashima <kuniyu@amazon.com>, David Howells <dhowells@redhat.com>, Alexander Mikhalitsyn <alexander@mihalicyn.com>, Kirill Tkhai <tkhai@ya.ru>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RERESEND 02/11] af_unix: unix_stream_splice_read: always request MSG_DONTWAIT Message-ID: <28db45d00902da22ae25aa16a0c28bb41002fc039.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="ye7hyns4bd3ezngs" 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 14 Dec 2023 10:45:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785284042300258738 X-GMAIL-MSGID: 1785284042300258738 |
Series |
splice(file<>pipe) I/O on file as-if O_NONBLOCK
|
|
Commit Message
Ahelenia Ziemiańska
Dec. 14, 2023, 6:44 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/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 socket *sock, loff_t *ppos, .pipe = pipe, .size = size, .splice_flags = flags, + .flags = MSG_DONTWAIT, }; if (unlikely(*ppos)) return -ESPIPE; - if (sock->file->f_flags & O_NONBLOCK || - flags & SPLICE_F_NONBLOCK) - state.flags = MSG_DONTWAIT; - return unix_stream_read_generic(&state, false); }