From: "Ahelenia Ziemiańska" <nabijaczleweli@nabijaczleweli.xyz> To: unlisted-recipients:; (no To-header on input) 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 Date: Mon, 16 Oct 2023 22:35:52 +0200 [thread overview] Message-ID: <b5a634f5fe1a89d42a7a4f91316f888b02ca576f.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> (raw) In-Reply-To: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> [-- Attachment #1: Type: text/plain, Size: 948 bytes --] 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; -- 2.39.2 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: "Ahelenia Ziemiańska" <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 Date: Mon, 16 Oct 2023 22:35:52 +0200 [thread overview] Message-ID: <b5a634f5fe1a89d42a7a4f91316f888b02ca576f.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> (raw) In-Reply-To: <cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> [-- Attachment #1: Type: text/plain, Size: 948 bytes --] 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; -- 2.39.2 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2023-10-16 20:36 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-10-16 20:35 [PATCH 00/11] splice(file<>pipe) I/O on file as-if O_NONBLOCK Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 01/11] splice: copy_splice_read: do the I/O with IOCB_NOWAIT Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 02/11] af_unix: unix_stream_splice_read: always request MSG_DONTWAIT Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 03/11] fuse: fuse_dev_splice_read: use nonblocking I/O Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 04/11] tracing: tracing_buffers_splice_read: behave as-if non-blocking I/O Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 05/11] relayfs: relay_file_splice_read: always return -EAGAIN for no data Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 06/11] net/smc: smc_splice_read: always request MSG_DONTWAIT Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska [this message] 2023-10-16 20:35 ` [PATCH 07/11] kcm: kcm_splice_read: " Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 09/11] net/tcp: tcp_splice_read: always do non-blocking reads Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:35 ` [PATCH 10/11] splice: file->pipe: -EINVAL for non-regular files w/o FMODE_NOWAIT Ahelenia Ziemiańska 2023-10-16 20:35 ` Ahelenia Ziemiańska 2023-10-16 20:36 ` [PATCH 11/11] splice: splice_to_socket: always request MSG_DONTWAIT Ahelenia Ziemiańska 2023-10-16 20:36 ` Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 00/11] splice(file<>pipe) I/O on file as-if O_NONBLOCK Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 01/11] splice: copy_splice_read: do the I/O with IOCB_NOWAIT Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 02/11] af_unix: unix_stream_splice_read: always request MSG_DONTWAIT Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 03/11] fuse: fuse_dev_splice_read: use nonblocking I/O Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 04/11] tracing: tracing_buffers_splice_read: behave as-if non-blocking I/O Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 05/11] relayfs: relay_file_splice_read: always return -EAGAIN for no data Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 06/11] net/smc: smc_splice_read: always request MSG_DONTWAIT Ahelenia Ziemiańska 2023-12-13 1:48 ` Tony Lu 2023-12-14 0:28 ` Jakub Kicinski 2023-12-14 10:50 ` Christian Brauner 2023-12-14 16:57 ` Jens Axboe 2023-12-14 17:38 ` Jakub Kicinski 2023-12-12 10:12 ` [PATCH RESEND 07/11] kcm: kcm_splice_read: " Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 09/11] net/tcp: tcp_splice_read: always do non-blocking reads Ahelenia Ziemiańska 2023-12-12 10:12 ` [PATCH RESEND 10/11] splice: file->pipe: -EINVAL for non-regular files w/o FMODE_NOWAIT Ahelenia Ziemiańska 2023-12-12 10:13 ` [PATCH RESEND 11/11] splice: splice_to_socket: always request MSG_DONTWAIT Ahelenia Ziemiańska
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=b5a634f5fe1a89d42a7a4f91316f888b02ca576f.1697486714.git.nabijaczleweli@nabijaczleweli.xyz \ --to=nabijaczleweli@nabijaczleweli.xyz \ --cc=cong.wang@bytedance.com \ --cc=davem@davemloft.net \ --cc=dhowells@redhat.com \ --cc=edumazet@google.com \ --cc=kuba@kernel.org \ --cc=kuniyu@amazon.com \ --cc=linux-kernel@vger.kernel.org \ --cc=netdev@vger.kernel.org \ --cc=pabeni@redhat.com \ --cc=syoshida@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.