From: Greg Kroah-Hartman Date: Wed, 30 Aug 2017 15:29:35 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v3.18.69~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2984baeaafc659883f548ba2c616379c82eafce8;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: alsa-au88x0-fix-zero-clear-of-stream-resources.patch btrfs-remove-duplicate-const-specifier.patch i2c-jz4780-drop-superfluous-init.patch --- diff --git a/queue-4.4/alsa-au88x0-fix-zero-clear-of-stream-resources.patch b/queue-4.4/alsa-au88x0-fix-zero-clear-of-stream-resources.patch new file mode 100644 index 00000000000..beccbcc4217 --- /dev/null +++ b/queue-4.4/alsa-au88x0-fix-zero-clear-of-stream-resources.patch @@ -0,0 +1,76 @@ +From 639db596165746ca87bbcb56559b094fd9042890 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 12 May 2016 18:04:16 +0200 +Subject: ALSA: au88x0: Fix zero clear of stream->resources + +From: Takashi Iwai + +commit 639db596165746ca87bbcb56559b094fd9042890 upstream. + +There are a few calls of memset() to stream->resources, but they all +are called in a wrong size, sizeof(unsigned char) * VORTEX_RESOURCE_LAST, +while this field is a u32 array. This may leave the memories not +zero-cleared. + +Fix it by replacing them with a simpler sizeof(stream->resources) +instead. + +Reported-by: David Binderman +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/au88x0/au88x0_core.c | 14 +++++--------- + 1 file changed, 5 insertions(+), 9 deletions(-) + +--- a/sound/pci/au88x0/au88x0_core.c ++++ b/sound/pci/au88x0/au88x0_core.c +@@ -2150,8 +2150,7 @@ vortex_adb_allocroute(vortex_t *vortex, + stream->resources, en, + VORTEX_RESOURCE_SRC)) < 0) { + memset(stream->resources, 0, +- sizeof(unsigned char) * +- VORTEX_RESOURCE_LAST); ++ sizeof(stream->resources)); + return -EBUSY; + } + if (stream->type != VORTEX_PCM_A3D) { +@@ -2161,7 +2160,7 @@ vortex_adb_allocroute(vortex_t *vortex, + VORTEX_RESOURCE_MIXIN)) < 0) { + memset(stream->resources, + 0, +- sizeof(unsigned char) * VORTEX_RESOURCE_LAST); ++ sizeof(stream->resources)); + return -EBUSY; + } + } +@@ -2174,8 +2173,7 @@ vortex_adb_allocroute(vortex_t *vortex, + stream->resources, en, + VORTEX_RESOURCE_A3D)) < 0) { + memset(stream->resources, 0, +- sizeof(unsigned char) * +- VORTEX_RESOURCE_LAST); ++ sizeof(stream->resources)); + dev_err(vortex->card->dev, + "out of A3D sources. Sorry\n"); + return -EBUSY; +@@ -2289,8 +2287,7 @@ vortex_adb_allocroute(vortex_t *vortex, + VORTEX_RESOURCE_MIXOUT)) + < 0) { + memset(stream->resources, 0, +- sizeof(unsigned char) * +- VORTEX_RESOURCE_LAST); ++ sizeof(stream->resources)); + return -EBUSY; + } + if ((src[i] = +@@ -2298,8 +2295,7 @@ vortex_adb_allocroute(vortex_t *vortex, + stream->resources, en, + VORTEX_RESOURCE_SRC)) < 0) { + memset(stream->resources, 0, +- sizeof(unsigned char) * +- VORTEX_RESOURCE_LAST); ++ sizeof(stream->resources)); + return -EBUSY; + } + } diff --git a/queue-4.4/btrfs-remove-duplicate-const-specifier.patch b/queue-4.4/btrfs-remove-duplicate-const-specifier.patch new file mode 100644 index 00000000000..09f51b99a0a --- /dev/null +++ b/queue-4.4/btrfs-remove-duplicate-const-specifier.patch @@ -0,0 +1,30 @@ +From fb75d857a31d600cc0c37b8c7d914014f7fa3f9a Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 19 Jan 2016 00:05:28 +0000 +Subject: btrfs: remove duplicate const specifier + +From: Colin Ian King + +commit fb75d857a31d600cc0c37b8c7d914014f7fa3f9a upstream. + +duplicate const is redundant so remove it + +Signed-off-by: Colin Ian King +Signed-off-by: David Sterba +Signed-off-by: Greg Kroah-Hartman + +--- + fs/btrfs/volumes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/btrfs/volumes.c ++++ b/fs/btrfs/volumes.c +@@ -108,7 +108,7 @@ const struct btrfs_raid_attr btrfs_raid_ + }, + }; + +-const u64 const btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { ++const u64 btrfs_raid_group[BTRFS_NR_RAID_TYPES] = { + [BTRFS_RAID_RAID10] = BTRFS_BLOCK_GROUP_RAID10, + [BTRFS_RAID_RAID1] = BTRFS_BLOCK_GROUP_RAID1, + [BTRFS_RAID_DUP] = BTRFS_BLOCK_GROUP_DUP, diff --git a/queue-4.4/i2c-jz4780-drop-superfluous-init.patch b/queue-4.4/i2c-jz4780-drop-superfluous-init.patch new file mode 100644 index 00000000000..a1ab434518f --- /dev/null +++ b/queue-4.4/i2c-jz4780-drop-superfluous-init.patch @@ -0,0 +1,35 @@ +From 27bfeb5a0619554d9734fb39e14f0e80fa7c342c Mon Sep 17 00:00:00 2001 +From: Wolfram Sang +Date: Sun, 5 Jun 2016 11:41:42 +0200 +Subject: i2c: jz4780: drop superfluous init + +From: Wolfram Sang + +commit 27bfeb5a0619554d9734fb39e14f0e80fa7c342c upstream. + +David reported that the length for memset was incorrect (element sizes +were not taken into account). Then I saw that we are clearing kzalloced +memory, so we can simply drop this code. + +Reported-by: David Binderman +Reviewed-by: Axel Lin +Signed-off-by: Wolfram Sang +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/i2c/busses/i2c-jz4780.c | 4 ---- + 1 file changed, 4 deletions(-) + +--- a/drivers/i2c/busses/i2c-jz4780.c ++++ b/drivers/i2c/busses/i2c-jz4780.c +@@ -786,10 +786,6 @@ static int jz4780_i2c_probe(struct platf + + jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0); + +- i2c->cmd = 0; +- memset(i2c->cmd_buf, 0, BUFSIZE); +- memset(i2c->data_buf, 0, BUFSIZE); +- + i2c->irq = platform_get_irq(pdev, 0); + ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0, + dev_name(&pdev->dev), i2c); diff --git a/queue-4.4/series b/queue-4.4/series index 0cb395826f4..8ff501eae9b 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1 +1,4 @@ scsi-isci-avoid-array-subscript-warning.patch +alsa-au88x0-fix-zero-clear-of-stream-resources.patch +btrfs-remove-duplicate-const-specifier.patch +i2c-jz4780-drop-superfluous-init.patch