]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 10:27:36 +0000 (11:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Dec 2018 10:27:36 +0000 (11:27 +0100)
added patches:
kgdboc-fix-restrict-error.patch

queue-4.19/kgdboc-fix-restrict-error.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/kgdboc-fix-restrict-error.patch b/queue-4.19/kgdboc-fix-restrict-error.patch
new file mode 100644 (file)
index 0000000..e6b7697
--- /dev/null
@@ -0,0 +1,52 @@
+From 2dd453168643d9475028cd867c57e65956a0f7f9 Mon Sep 17 00:00:00 2001
+From: Laura Abbott <labbott@redhat.com>
+Date: Mon, 10 Sep 2018 16:20:14 -0700
+Subject: kgdboc: Fix restrict error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Laura Abbott <labbott@redhat.com>
+
+commit 2dd453168643d9475028cd867c57e65956a0f7f9 upstream.
+
+There's an error when compiled with restrict:
+
+drivers/tty/serial/kgdboc.c: In function ‘configure_kgdboc’:
+drivers/tty/serial/kgdboc.c:137:2: error: ‘strcpy’ source argument is the same
+as destination [-Werror=restrict]
+  strcpy(config, opt);
+  ^~~~~~~~~~~~~~~~~~~
+
+As the error implies, this is from trying to use config as both source and
+destination. Drop the call to the function where config is the argument
+since nothing else happens in the function.
+
+Signed-off-by: Laura Abbott <labbott@redhat.com>
+Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/tty/serial/kgdboc.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/tty/serial/kgdboc.c
++++ b/drivers/tty/serial/kgdboc.c
+@@ -159,15 +159,13 @@ static int configure_kgdboc(void)
+ {
+       struct tty_driver *p;
+       int tty_line = 0;
+-      int err;
++      int err = -ENODEV;
+       char *cptr = config;
+       struct console *cons;
+-      err = kgdboc_option_setup(config);
+-      if (err || !strlen(config) || isspace(config[0]))
++      if (!strlen(config) || isspace(config[0]))
+               goto noconfig;
+-      err = -ENODEV;
+       kgdboc_io_ops.is_console = 0;
+       kgdb_tty_driver = NULL;
index bab39a185500d24ebe56ff66848789193c280e41..3505d378fefdfc2b095bce48f2c32e282d819970 100644 (file)
@@ -22,3 +22,4 @@ userfaultfd-use-enoent-instead-of-efault-if-the-atomic-copy-user-fails.patch
 userfaultfd-shmem-allocate-anonymous-memory-for-map_private-shmem.patch
 userfaultfd-shmem-add-i_size-checks.patch
 userfaultfd-shmem-uffdio_copy-set-the-page-dirty-if-vm_write-is-not-set.patch
+kgdboc-fix-restrict-error.patch