]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 07:47:59 +0000 (09:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 07:47:59 +0000 (09:47 +0200)
added patches:
selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch

queue-4.19/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch b/queue-4.19/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch
new file mode 100644 (file)
index 0000000..fa93d6b
--- /dev/null
@@ -0,0 +1,31 @@
+From foo@baz Tue 16 Jun 2020 09:45:41 AM CEST
+From: tannerlove <tannerlove@google.com>
+Date: Tue, 9 Jun 2020 17:21:32 -0400
+Subject: selftests/net: in rxtimestamp getopt_long needs terminating null entry
+
+From: tannerlove <tannerlove@google.com>
+
+[ Upstream commit 865a6cbb2288f8af7f9dc3b153c61b7014fdcf1e ]
+
+getopt_long requires the last element to be filled with zeros.
+Otherwise, passing an unrecognized option can cause a segfault.
+
+Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
+Signed-off-by: Tanner Love <tannerlove@google.com>
+Acked-by: Willem de Bruijn <willemb@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/networking/timestamping/rxtimestamp.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/testing/selftests/networking/timestamping/rxtimestamp.c
++++ b/tools/testing/selftests/networking/timestamping/rxtimestamp.c
+@@ -114,6 +114,7 @@ static struct option long_options[] = {
+       { "tcp", no_argument, 0, 't' },
+       { "udp", no_argument, 0, 'u' },
+       { "ip", no_argument, 0, 'i' },
++      { NULL, 0, NULL, 0 },
+ };
+ static int next_port = 19999;
index 6157444a3a0468f3304a3111eb9e177bb5cd15f8..4e8e49ac3c98588c48746542a59531f38cea2f9f 100644 (file)
@@ -64,3 +64,4 @@ spi-pxa2xx-fix-runtime-pm-ref-imbalance-on-probe-err.patch
 crypto-virtio-fix-use-after-free-in-virtio_crypto_sk.patch
 crypto-virtio-fix-src-dst-scatterlist-calculation-in.patch
 crypto-virtio-fix-dest-length-calculation-in-__virti.patch
+selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch