]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop fs-make-splice-and-tee-take-into-account-o_nonblock-.patch from everywhere
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Apr 2019 17:31:39 +0000 (19:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Apr 2019 17:31:39 +0000 (19:31 +0200)
queue-4.14/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch [deleted file]
queue-4.14/series
queue-4.19/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch [deleted file]
queue-4.19/series
queue-4.9/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch [deleted file]
queue-4.9/series
queue-5.0/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch [deleted file]
queue-5.0/series

diff --git a/queue-4.14/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch b/queue-4.14/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
deleted file mode 100644 (file)
index 01c52d1..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-From 27644b87ea4c14f403d569be9cb41227018b6ac8 Mon Sep 17 00:00:00 2001
-From: Slavomir Kaslev <kaslevs@vmware.com>
-Date: Thu, 7 Feb 2019 17:45:19 +0200
-Subject: fs: Make splice() and tee() take into account O_NONBLOCK flag on
- pipes
-
-[ Upstream commit ee5e001196d1345b8fee25925ff5f1d67936081e ]
-
-The current implementation of splice() and tee() ignores O_NONBLOCK set
-on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag for
-blocking on pipe arguments.  This is inconsistent since splice()-ing
-from/to non-pipe file descriptors does take O_NONBLOCK into
-consideration.
-
-Fix this by promoting O_NONBLOCK, when set on a pipe, to
-SPLICE_F_NONBLOCK.
-
-Some context for how the current implementation of splice() leads to
-inconsistent behavior.  In the ongoing work[1] to add VM tracing
-capability to trace-cmd we stream tracing data over named FIFOs or
-vsockets from guests back to the host.
-
-When we receive SIGINT from user to stop tracing, we set O_NONBLOCK on
-the input file descriptor and set SPLICE_F_NONBLOCK for the next call to
-splice().  If splice() was blocked waiting on data from the input FIFO,
-after SIGINT splice() restarts with the same arguments (no
-SPLICE_F_NONBLOCK) and blocks again instead of returning -EAGAIN when no
-data is available.
-
-This differs from the splice() behavior when reading from a vsocket or
-when we're doing a traditional read()/write() loop (trace-cmd's
---nosplice argument).
-
-With this patch applied we get the same behavior in all situations after
-setting O_NONBLOCK which also matches the behavior of doing a
-read()/write() loop instead of splice().
-
-This change does have potential of breaking users who don't expect
-EAGAIN from splice() when SPLICE_F_NONBLOCK is not set.  OTOH programs
-that set O_NONBLOCK and don't anticipate EAGAIN are arguably buggy[2].
-
- [1] https://github.com/skaslev/trace-cmd/tree/vsock
- [2] https://github.com/torvalds/linux/blob/d47e3da1759230e394096fd742aad423c291ba48/fs/read_write.c#L1425
-
-Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
-Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/splice.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/fs/splice.c b/fs/splice.c
-index 00d2f142dcf9..3ff3e7fb3b5a 100644
---- a/fs/splice.c
-+++ b/fs/splice.c
-@@ -1118,6 +1118,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (ipipe == opipe)
-                       return -EINVAL;
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               return splice_pipe_to_pipe(ipipe, opipe, len, flags);
-       }
-@@ -1143,6 +1146,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (unlikely(ret < 0))
-                       return ret;
-+              if (in->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               file_start_write(out);
-               ret = do_splice_from(ipipe, out, &offset, len, flags);
-               file_end_write(out);
-@@ -1167,6 +1173,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-                       offset = in->f_pos;
-               }
-+              if (out->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               pipe_lock(opipe);
-               ret = wait_for_space(opipe, flags);
-               if (!ret)
-@@ -1704,6 +1713,9 @@ static long do_tee(struct file *in, struct file *out, size_t len,
-        * copying the data.
-        */
-       if (ipipe && opipe && ipipe != opipe) {
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               /*
-                * Keep going, unless we encounter an error. The ipipe/opipe
-                * ordering doesn't really matter.
--- 
-2.19.1
-
index 1cc14d252f2a7111f46152c6bd3596d84e48e263..a94db981c3346d2772d46192cade7543e545aa67 100644 (file)
@@ -29,7 +29,6 @@ page_poison-play-nicely-with-kasan.patch
 cifs-use-correct-format-characters.patch
 dm-thin-add-sanity-checks-to-thin-pool-and-external-.patch
 cifs-fix-null-pointer-dereference-of-devname.patch
-fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
 jbd2-fix-invalid-descriptor-block-checksum.patch
 fs-fix-guard_bio_eod-to-check-for-real-eod-errors.patch
 tools-lib-traceevent-fix-buffer-overflow-in-arg_eval.patch
diff --git a/queue-4.19/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch b/queue-4.19/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
deleted file mode 100644 (file)
index fc6eba8..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-From 7980a6911ac8cd6326450a8dee56b5bb12fa7aee Mon Sep 17 00:00:00 2001
-From: Slavomir Kaslev <kaslevs@vmware.com>
-Date: Thu, 7 Feb 2019 17:45:19 +0200
-Subject: fs: Make splice() and tee() take into account O_NONBLOCK flag on
- pipes
-
-[ Upstream commit ee5e001196d1345b8fee25925ff5f1d67936081e ]
-
-The current implementation of splice() and tee() ignores O_NONBLOCK set
-on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag for
-blocking on pipe arguments.  This is inconsistent since splice()-ing
-from/to non-pipe file descriptors does take O_NONBLOCK into
-consideration.
-
-Fix this by promoting O_NONBLOCK, when set on a pipe, to
-SPLICE_F_NONBLOCK.
-
-Some context for how the current implementation of splice() leads to
-inconsistent behavior.  In the ongoing work[1] to add VM tracing
-capability to trace-cmd we stream tracing data over named FIFOs or
-vsockets from guests back to the host.
-
-When we receive SIGINT from user to stop tracing, we set O_NONBLOCK on
-the input file descriptor and set SPLICE_F_NONBLOCK for the next call to
-splice().  If splice() was blocked waiting on data from the input FIFO,
-after SIGINT splice() restarts with the same arguments (no
-SPLICE_F_NONBLOCK) and blocks again instead of returning -EAGAIN when no
-data is available.
-
-This differs from the splice() behavior when reading from a vsocket or
-when we're doing a traditional read()/write() loop (trace-cmd's
---nosplice argument).
-
-With this patch applied we get the same behavior in all situations after
-setting O_NONBLOCK which also matches the behavior of doing a
-read()/write() loop instead of splice().
-
-This change does have potential of breaking users who don't expect
-EAGAIN from splice() when SPLICE_F_NONBLOCK is not set.  OTOH programs
-that set O_NONBLOCK and don't anticipate EAGAIN are arguably buggy[2].
-
- [1] https://github.com/skaslev/trace-cmd/tree/vsock
- [2] https://github.com/torvalds/linux/blob/d47e3da1759230e394096fd742aad423c291ba48/fs/read_write.c#L1425
-
-Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
-Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/splice.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/fs/splice.c b/fs/splice.c
-index 29e92b506394..7769181aa1a6 100644
---- a/fs/splice.c
-+++ b/fs/splice.c
-@@ -1119,6 +1119,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (ipipe == opipe)
-                       return -EINVAL;
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               return splice_pipe_to_pipe(ipipe, opipe, len, flags);
-       }
-@@ -1144,6 +1147,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (unlikely(ret < 0))
-                       return ret;
-+              if (in->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               file_start_write(out);
-               ret = do_splice_from(ipipe, out, &offset, len, flags);
-               file_end_write(out);
-@@ -1168,6 +1174,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-                       offset = in->f_pos;
-               }
-+              if (out->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               pipe_lock(opipe);
-               ret = wait_for_space(opipe, flags);
-               if (!ret)
-@@ -1717,6 +1726,9 @@ static long do_tee(struct file *in, struct file *out, size_t len,
-        * copying the data.
-        */
-       if (ipipe && opipe && ipipe != opipe) {
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               /*
-                * Keep going, unless we encounter an error. The ipipe/opipe
-                * ordering doesn't really matter.
--- 
-2.19.1
-
index d1c3564cc6dbb203d70ed3bd8d623f7f03d3da9c..bc03bfe426203726df7ebe4b55298ec8bdef66be 100644 (file)
@@ -38,7 +38,6 @@ dm-thin-add-sanity-checks-to-thin-pool-and-external-.patch
 f2fs-fix-to-check-inline_xattr_size-boundary-correct.patch
 cifs-accept-validate-negotiate-if-server-return-nt_s.patch
 cifs-fix-null-pointer-dereference-of-devname.patch
-fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
 netfilter-nf_tables-check-the-result-of-dereferencin.patch
 netfilter-conntrack-tcp-only-close-if-rst-matches-ex.patch
 jbd2-fix-invalid-descriptor-block-checksum.patch
diff --git a/queue-4.9/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch b/queue-4.9/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
deleted file mode 100644 (file)
index 2665b90..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-From 82e62127e274805ab1040e735ac8e999de0592e9 Mon Sep 17 00:00:00 2001
-From: Slavomir Kaslev <kaslevs@vmware.com>
-Date: Thu, 7 Feb 2019 17:45:19 +0200
-Subject: fs: Make splice() and tee() take into account O_NONBLOCK flag on
- pipes
-
-[ Upstream commit ee5e001196d1345b8fee25925ff5f1d67936081e ]
-
-The current implementation of splice() and tee() ignores O_NONBLOCK set
-on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag for
-blocking on pipe arguments.  This is inconsistent since splice()-ing
-from/to non-pipe file descriptors does take O_NONBLOCK into
-consideration.
-
-Fix this by promoting O_NONBLOCK, when set on a pipe, to
-SPLICE_F_NONBLOCK.
-
-Some context for how the current implementation of splice() leads to
-inconsistent behavior.  In the ongoing work[1] to add VM tracing
-capability to trace-cmd we stream tracing data over named FIFOs or
-vsockets from guests back to the host.
-
-When we receive SIGINT from user to stop tracing, we set O_NONBLOCK on
-the input file descriptor and set SPLICE_F_NONBLOCK for the next call to
-splice().  If splice() was blocked waiting on data from the input FIFO,
-after SIGINT splice() restarts with the same arguments (no
-SPLICE_F_NONBLOCK) and blocks again instead of returning -EAGAIN when no
-data is available.
-
-This differs from the splice() behavior when reading from a vsocket or
-when we're doing a traditional read()/write() loop (trace-cmd's
---nosplice argument).
-
-With this patch applied we get the same behavior in all situations after
-setting O_NONBLOCK which also matches the behavior of doing a
-read()/write() loop instead of splice().
-
-This change does have potential of breaking users who don't expect
-EAGAIN from splice() when SPLICE_F_NONBLOCK is not set.  OTOH programs
-that set O_NONBLOCK and don't anticipate EAGAIN are arguably buggy[2].
-
- [1] https://github.com/skaslev/trace-cmd/tree/vsock
- [2] https://github.com/torvalds/linux/blob/d47e3da1759230e394096fd742aad423c291ba48/fs/read_write.c#L1425
-
-Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
-Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/splice.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/fs/splice.c b/fs/splice.c
-index 01983bea760c..3f9e7a724d85 100644
---- a/fs/splice.c
-+++ b/fs/splice.c
-@@ -1137,6 +1137,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (ipipe == opipe)
-                       return -EINVAL;
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               return splice_pipe_to_pipe(ipipe, opipe, len, flags);
-       }
-@@ -1162,6 +1165,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (unlikely(ret < 0))
-                       return ret;
-+              if (in->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               file_start_write(out);
-               ret = do_splice_from(ipipe, out, &offset, len, flags);
-               file_end_write(out);
-@@ -1186,6 +1192,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-                       offset = in->f_pos;
-               }
-+              if (out->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               pipe_lock(opipe);
-               ret = wait_for_space(opipe, flags);
-               if (!ret)
-@@ -1718,6 +1727,9 @@ static long do_tee(struct file *in, struct file *out, size_t len,
-        * copying the data.
-        */
-       if (ipipe && opipe && ipipe != opipe) {
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               /*
-                * Keep going, unless we encounter an error. The ipipe/opipe
-                * ordering doesn't really matter.
--- 
-2.19.1
-
index 88546404d058147219e52db7d82565a2a30defa4..d80e15a1ac5a9d3fd47ba03b1af762aad0618270 100644 (file)
@@ -24,7 +24,6 @@ fs-file.c-initialize-init_files.resize_wait.patch
 cifs-use-correct-format-characters.patch
 dm-thin-add-sanity-checks-to-thin-pool-and-external-.patch
 cifs-fix-null-pointer-dereference-of-devname.patch
-fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
 jbd2-fix-invalid-descriptor-block-checksum.patch
 fs-fix-guard_bio_eod-to-check-for-real-eod-errors.patch
 tools-lib-traceevent-fix-buffer-overflow-in-arg_eval.patch
diff --git a/queue-5.0/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch b/queue-5.0/fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
deleted file mode 100644 (file)
index 112407f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-From 2f05bd7c870433744b96e7322f84bf3979ff1cd8 Mon Sep 17 00:00:00 2001
-From: Slavomir Kaslev <kaslevs@vmware.com>
-Date: Thu, 7 Feb 2019 17:45:19 +0200
-Subject: fs: Make splice() and tee() take into account O_NONBLOCK flag on
- pipes
-
-[ Upstream commit ee5e001196d1345b8fee25925ff5f1d67936081e ]
-
-The current implementation of splice() and tee() ignores O_NONBLOCK set
-on pipe file descriptors and checks only the SPLICE_F_NONBLOCK flag for
-blocking on pipe arguments.  This is inconsistent since splice()-ing
-from/to non-pipe file descriptors does take O_NONBLOCK into
-consideration.
-
-Fix this by promoting O_NONBLOCK, when set on a pipe, to
-SPLICE_F_NONBLOCK.
-
-Some context for how the current implementation of splice() leads to
-inconsistent behavior.  In the ongoing work[1] to add VM tracing
-capability to trace-cmd we stream tracing data over named FIFOs or
-vsockets from guests back to the host.
-
-When we receive SIGINT from user to stop tracing, we set O_NONBLOCK on
-the input file descriptor and set SPLICE_F_NONBLOCK for the next call to
-splice().  If splice() was blocked waiting on data from the input FIFO,
-after SIGINT splice() restarts with the same arguments (no
-SPLICE_F_NONBLOCK) and blocks again instead of returning -EAGAIN when no
-data is available.
-
-This differs from the splice() behavior when reading from a vsocket or
-when we're doing a traditional read()/write() loop (trace-cmd's
---nosplice argument).
-
-With this patch applied we get the same behavior in all situations after
-setting O_NONBLOCK which also matches the behavior of doing a
-read()/write() loop instead of splice().
-
-This change does have potential of breaking users who don't expect
-EAGAIN from splice() when SPLICE_F_NONBLOCK is not set.  OTOH programs
-that set O_NONBLOCK and don't anticipate EAGAIN are arguably buggy[2].
-
- [1] https://github.com/skaslev/trace-cmd/tree/vsock
- [2] https://github.com/torvalds/linux/blob/d47e3da1759230e394096fd742aad423c291ba48/fs/read_write.c#L1425
-
-Signed-off-by: Slavomir Kaslev <kaslevs@vmware.com>
-Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- fs/splice.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/fs/splice.c b/fs/splice.c
-index 90c29675d573..f568273ac336 100644
---- a/fs/splice.c
-+++ b/fs/splice.c
-@@ -1123,6 +1123,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (ipipe == opipe)
-                       return -EINVAL;
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               return splice_pipe_to_pipe(ipipe, opipe, len, flags);
-       }
-@@ -1148,6 +1151,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-               if (unlikely(ret < 0))
-                       return ret;
-+              if (in->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               file_start_write(out);
-               ret = do_splice_from(ipipe, out, &offset, len, flags);
-               file_end_write(out);
-@@ -1172,6 +1178,9 @@ static long do_splice(struct file *in, loff_t __user *off_in,
-                       offset = in->f_pos;
-               }
-+              if (out->f_flags & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               pipe_lock(opipe);
-               ret = wait_for_space(opipe, flags);
-               if (!ret)
-@@ -1721,6 +1730,9 @@ static long do_tee(struct file *in, struct file *out, size_t len,
-        * copying the data.
-        */
-       if (ipipe && opipe && ipipe != opipe) {
-+              if ((in->f_flags | out->f_flags) & O_NONBLOCK)
-+                      flags |= SPLICE_F_NONBLOCK;
-+
-               /*
-                * Keep going, unless we encounter an error. The ipipe/opipe
-                * ordering doesn't really matter.
--- 
-2.19.1
-
index 15ac7f4928d5d728aa268435dce42e2d27b8508c..48091d850467e26acbf0fba1bfc2983596f45a8b 100644 (file)
@@ -44,7 +44,6 @@ dm-thin-add-sanity-checks-to-thin-pool-and-external-.patch
 f2fs-fix-to-check-inline_xattr_size-boundary-correct.patch
 cifs-accept-validate-negotiate-if-server-return-nt_s.patch
 cifs-fix-null-pointer-dereference-of-devname.patch
-fs-make-splice-and-tee-take-into-account-o_nonblock-.patch
 perf-beauty-msg_flags-add-missing-s-lost-when-adding.patch
 netfilter-nf_tables-check-the-result-of-dereferencin.patch
 pci-mediatek-fix-memory-mapped-io-range-size-computa.patch