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

queue-4.14/alsa-trident-suppress-gcc-string-warning.patch [new file with mode: 0644]
queue-4.14/kgdboc-fix-restrict-error.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/alsa-trident-suppress-gcc-string-warning.patch b/queue-4.14/alsa-trident-suppress-gcc-string-warning.patch
new file mode 100644 (file)
index 0000000..778b70d
--- /dev/null
@@ -0,0 +1,43 @@
+From d6b340d7cb33c816ef4abe8143764ec5ab14a5cc Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Thu, 26 Jul 2018 14:58:03 +0200
+Subject: ALSA: trident: Suppress gcc string warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit d6b340d7cb33c816ef4abe8143764ec5ab14a5cc upstream.
+
+The meddlesome gcc warns about the possible shortname string in
+trident driver code:
+  sound/pci/trident/trident.c: In function ‘snd_trident_probe’:
+  sound/pci/trident/trident.c:126:2: warning: ‘strcat’ accessing 17 or more bytes at offsets 36 and 20 may overlap 1 byte at offset 36 [-Wrestrict]
+  strcat(card->shortname, card->driver);
+
+It happens since gcc calculates the possible string size from
+card->driver, but this can't be true since we did set the string just
+before that, and they are much shorter.
+
+For shutting it up, use the exactly same string set to card->driver
+for strcat() to card->shortname, too.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/trident/trident.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/sound/pci/trident/trident.c
++++ b/sound/pci/trident/trident.c
+@@ -123,7 +123,7 @@ static int snd_trident_probe(struct pci_
+       } else {
+               strcpy(card->shortname, "Trident ");
+       }
+-      strcat(card->shortname, card->driver);
++      strcat(card->shortname, str);
+       sprintf(card->longname, "%s PCI Audio at 0x%lx, irq %d",
+               card->shortname, trident->port, trident->irq);
diff --git a/queue-4.14/kgdboc-fix-restrict-error.patch b/queue-4.14/kgdboc-fix-restrict-error.patch
new file mode 100644 (file)
index 0000000..01f2703
--- /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
+@@ -162,15 +162,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 10833de4520eb1a35322bead72b21e81a9f7f316..8ade3d4ed04e39242c2522f28d1edf59b7ca0f9f 100644 (file)
@@ -25,3 +25,5 @@ userfaultfd-shmem-add-i_size-checks.patch
 userfaultfd-shmem-uffdio_copy-set-the-page-dirty-if-vm_write-is-not-set.patch
 scsi-scsi_devinfo-cleanly-zero-pad-devinfo-strings.patch
 userfaultfd-shmem-hugetlbfs-only-allow-to-register-vm_maywrite-vmas.patch
+alsa-trident-suppress-gcc-string-warning.patch
+kgdboc-fix-restrict-error.patch