From 6d5386fb82b11984d424f910ac6635dcf8c86599 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 16 Jun 2020 09:47:59 +0200 Subject: [PATCH] 4.19-stable patches added patches: selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch --- ...pt_long-needs-terminating-null-entry.patch | 31 +++++++++++++++++++ queue-4.19/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 queue-4.19/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch 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 index 00000000000..fa93d6b8ebb --- /dev/null +++ b/queue-4.19/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch @@ -0,0 +1,31 @@ +From foo@baz Tue 16 Jun 2020 09:45:41 AM CEST +From: tannerlove +Date: Tue, 9 Jun 2020 17:21:32 -0400 +Subject: selftests/net: in rxtimestamp getopt_long needs terminating null entry + +From: tannerlove + +[ 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 +Acked-by: Willem de Bruijn +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + 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; diff --git a/queue-4.19/series b/queue-4.19/series index 6157444a3a0..4e8e49ac3c9 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -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 -- 2.47.3