From: Greg Kroah-Hartman Date: Tue, 8 Sep 2020 12:43:45 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v4.14.197~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=af92a4203121add849c3274568527304f6a18e31;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches 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 --- 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 index 00000000000..6d177d4fe89 --- /dev/null +++ b/queue-4.4/alsa-ca0106-fix-error-code-handling.patch @@ -0,0 +1,35 @@ +From ee0761d1d8222bcc5c86bf10849dc86cf008557c Mon Sep 17 00:00:00 2001 +From: Tong Zhang +Date: Mon, 24 Aug 2020 18:45:41 -0400 +Subject: ALSA: ca0106: fix error code handling + +From: Tong Zhang + +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 +Cc: +Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..776fd0bffcd --- /dev/null +++ b/queue-4.4/alsa-pcm-oss-remove-superfluous-warn_on-for-mulaw-sanity-check.patch @@ -0,0 +1,40 @@ +From 949a1ebe8cea7b342085cb6a4946b498306b9493 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 1 Sep 2020 15:18:02 +0200 +Subject: ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check + +From: Takashi Iwai + +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: +Link: https://lore.kernel.org/r/20200901131802.18157-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..e5c95eb68ce --- /dev/null +++ b/queue-4.4/dm-cache-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch @@ -0,0 +1,42 @@ +From d16ff19e69ab57e08bf908faaacbceaf660249de Mon Sep 17 00:00:00 2001 +From: Ye Bin +Date: Tue, 1 Sep 2020 14:25:42 +0800 +Subject: dm cache metadata: Avoid returning cmd->bm wild pointer on error + +From: Ye Bin + +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 +Cc: stable@vger.kernel.org +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..43db10d68e2 --- /dev/null +++ b/queue-4.4/dm-thin-metadata-avoid-returning-cmd-bm-wild-pointer-on-error.patch @@ -0,0 +1,42 @@ +From 219403d7e56f9b716ad80ab87db85d29547ee73e Mon Sep 17 00:00:00 2001 +From: Ye Bin +Date: Tue, 1 Sep 2020 14:25:43 +0800 +Subject: dm thin metadata: Avoid returning cmd->bm wild pointer on error + +From: Ye Bin + +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 +Cc: stable@vger.kernel.org +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } diff --git a/queue-4.4/series b/queue-4.4/series index 163df535dab..eb74fee1c0f 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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