From: Greg Kroah-Hartman Date: Thu, 6 Dec 2018 10:27:21 +0000 (+0100) Subject: 4.14-stable patches X-Git-Tag: v4.19.8~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7309a4d2b45ffc48462715817a5eeb5bab31c20b;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: alsa-trident-suppress-gcc-string-warning.patch kgdboc-fix-restrict-error.patch --- 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 index 00000000000..778b70d0d97 --- /dev/null +++ b/queue-4.14/alsa-trident-suppress-gcc-string-warning.patch @@ -0,0 +1,43 @@ +From d6b340d7cb33c816ef4abe8143764ec5ab14a5cc Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +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 + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..01f2703916a --- /dev/null +++ b/queue-4.14/kgdboc-fix-restrict-error.patch @@ -0,0 +1,52 @@ +From 2dd453168643d9475028cd867c57e65956a0f7f9 Mon Sep 17 00:00:00 2001 +From: Laura Abbott +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 + +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 +Reviewed-by: Daniel Thompson +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + diff --git a/queue-4.14/series b/queue-4.14/series index 10833de4520..8ade3d4ed04 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -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