]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Sep 2020 12:43:45 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Sep 2020 12:43:45 +0000 (14:43 +0200)
added patches:
alsa-ca0106-fix-error-code-handling.patch
alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch
dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch
dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch

queue-4.4/alsa-ca0106-fix-error-code-handling.patch [new file with mode: 0644]
queue-4.4/alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch [new file with mode: 0644]
queue-4.4/dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch [new file with mode: 0644]
queue-4.4/dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/alsa-ca0106-fix-error-code-handling.patch b/queue-4.4/alsa-ca0106-fix-error-code-handling.patch
new file mode 100644 (file)
index 0000000..6d177d4
--- /dev/null
@@ -0,0 +1,35 @@
+From ee0761d1d8222bcc5c86bf10849dc86cf008557c Mon Sep 17 00:00:00 2001
+From: Tong Zhang <ztong0001@gmail.com>
+Date: Mon, 24 Aug 2020 18:45:41 -0400
+Subject: ALSA: ca0106: fix error code handling
+
+From: Tong Zhang <ztong0001@gmail.com>
+
+commit ee0761d1d8222bcc5c86bf10849dc86cf008557c upstream.
+
+snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac()
+is returning the error code directly, and the caller is expecting an
+negative error code
+
+Signed-off-by: Tong Zhang <ztong0001@gmail.com>
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/pci/ca0106/ca0106_main.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/sound/pci/ca0106/ca0106_main.c
++++ b/sound/pci/ca0106/ca0106_main.c
+@@ -551,7 +551,8 @@ static int snd_ca0106_pcm_power_dac(stru
+               else
+                       /* Power down */
+                       chip->spi_dac_reg[reg] |= bit;
+-              return snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]);
++              if (snd_ca0106_spi_write(chip, chip->spi_dac_reg[reg]) != 0)
++                      return -ENXIO;
+       }
+       return 0;
+ }
diff --git a/queue-4.4/alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch b/queue-4.4/alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch
new file mode 100644 (file)
index 0000000..776fd0b
--- /dev/null
@@ -0,0 +1,40 @@
+From 949a1ebe8cea7b342085cb6a4946b498306b9493 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 1 Sep 2020 15:18:02 +0200
+Subject: ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
+
+From: Takashi Iwai <tiwai@suse.de>
+
+commit 949a1ebe8cea7b342085cb6a4946b498306b9493 upstream.
+
+The PCM OSS mulaw plugin has a check of the format of the counter part
+whether it's a linear format.  The check is with snd_BUG_ON() that
+emits WARN_ON() when the debug config is set, and it confuses
+syzkaller as if it were a serious issue.  Let's drop snd_BUG_ON() for
+avoiding that.
+
+While we're at it, correct the error code to a more suitable, EINVAL.
+
+Reported-by: syzbot+23b22dc2e0b81cbfcc95@syzkaller.appspotmail.com
+Cc: <stable@vger.kernel.org>
+Link: https://lore.kernel.org/r/20200901131802.18157-1-tiwai@suse.de
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/core/oss/mulaw.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sound/core/oss/mulaw.c
++++ b/sound/core/oss/mulaw.c
+@@ -329,8 +329,8 @@ int snd_pcm_plugin_build_mulaw(struct sn
+               snd_BUG();
+               return -EINVAL;
+       }
+-      if (snd_BUG_ON(!snd_pcm_format_linear(format->format)))
+-              return -ENXIO;
++      if (!snd_pcm_format_linear(format->format))
++              return -EINVAL;
+       err = snd_pcm_plugin_build(plug, "Mu-Law<->linear conversion",
+                                  src_format, dst_format,
diff --git a/queue-4.4/dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch b/queue-4.4/dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch
new file mode 100644 (file)
index 0000000..e5c95eb
--- /dev/null
@@ -0,0 +1,42 @@
+From d16ff19e69ab57e08bf908faaacbceaf660249de Mon Sep 17 00:00:00 2001
+From: Ye Bin <yebin10@huawei.com>
+Date: Tue, 1 Sep 2020 14:25:42 +0800
+Subject: dm cache metadata: Avoid returning cmd->bm wild pointer on error
+
+From: Ye Bin <yebin10@huawei.com>
+
+commit d16ff19e69ab57e08bf908faaacbceaf660249de upstream.
+
+Maybe __create_persistent_data_objects() caller will use PTR_ERR as a
+pointer, it will lead to some strange things.
+
+Signed-off-by: Ye Bin <yebin10@huawei.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-cache-metadata.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-cache-metadata.c
++++ b/drivers/md/dm-cache-metadata.c
+@@ -501,12 +501,16 @@ static int __create_persistent_data_obje
+                                         CACHE_MAX_CONCURRENT_LOCKS);
+       if (IS_ERR(cmd->bm)) {
+               DMERR("could not create block manager");
+-              return PTR_ERR(cmd->bm);
++              r = PTR_ERR(cmd->bm);
++              cmd->bm = NULL;
++              return r;
+       }
+       r = __open_or_format_metadata(cmd, may_format_device);
+-      if (r)
++      if (r) {
+               dm_block_manager_destroy(cmd->bm);
++              cmd->bm = NULL;
++      }
+       return r;
+ }
diff --git a/queue-4.4/dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch b/queue-4.4/dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch
new file mode 100644 (file)
index 0000000..43db10d
--- /dev/null
@@ -0,0 +1,42 @@
+From 219403d7e56f9b716ad80ab87db85d29547ee73e Mon Sep 17 00:00:00 2001
+From: Ye Bin <yebin10@huawei.com>
+Date: Tue, 1 Sep 2020 14:25:43 +0800
+Subject: dm thin metadata:  Avoid returning cmd->bm wild pointer on error
+
+From: Ye Bin <yebin10@huawei.com>
+
+commit 219403d7e56f9b716ad80ab87db85d29547ee73e upstream.
+
+Maybe __create_persistent_data_objects() caller will use PTR_ERR as a
+pointer, it will lead to some strange things.
+
+Signed-off-by: Ye Bin <yebin10@huawei.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Mike Snitzer <snitzer@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/md/dm-thin-metadata.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/md/dm-thin-metadata.c
++++ b/drivers/md/dm-thin-metadata.c
+@@ -700,12 +700,16 @@ static int __create_persistent_data_obje
+                                         THIN_MAX_CONCURRENT_LOCKS);
+       if (IS_ERR(pmd->bm)) {
+               DMERR("could not create block manager");
+-              return PTR_ERR(pmd->bm);
++              r = PTR_ERR(pmd->bm);
++              pmd->bm = NULL;
++              return r;
+       }
+       r = __open_or_format_metadata(pmd, format_device);
+-      if (r)
++      if (r) {
+               dm_block_manager_destroy(pmd->bm);
++              pmd->bm = NULL;
++      }
+       return r;
+ }
index 163df535dab4e032d669f3b275bd129d853df0d5..eb74fee1c0ffd04643d33bfde8b38bc2b612452a 100644 (file)
@@ -38,3 +38,7 @@ drivers-net-usb-qmi_wwan-add-qmi_quirk_set_dtr-for-t.patch
 usb-qmi_wwan-add-d-link-dwm-222-a2-device-id.patch
 net-usb-qmi_wwan-add-telit-me910-support.patch
 net-usb-qmi_wwan-add-telit-0x1050-composition.patch
+alsa-ca0106-fix-error-code-handling.patch
+alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch
+dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch
+dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch