From: Greg Kroah-Hartman Date: Sun, 24 Jan 2021 13:35:40 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.19.171~44 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38d0ba0f836748bfc364650f94d8b2ba141f1ae2;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch alsa-hda-via-add-minimum-mute-flag.patch alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch --- diff --git a/queue-4.14/series b/queue-4.14/series new file mode 100644 index 00000000000..42e7cf8f26d --- /dev/null +++ b/queue-4.14/series @@ -0,0 +1,7 @@ +i2c-bpmp-tegra-ignore-unknown-i2c_m-flags.patch +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-via-add-minimum-mute-flag.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +mmc-sdhci-xenon-fix-1.8v-regulator-stabilization.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch +drm-atomic-put-state-on-error-path.patch diff --git a/queue-4.19/series b/queue-4.19/series new file mode 100644 index 00000000000..469ac9db29c --- /dev/null +++ b/queue-4.19/series @@ -0,0 +1,10 @@ +i2c-bpmp-tegra-ignore-unknown-i2c_m-flags.patch +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-via-add-minimum-mute-flag.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +btrfs-fix-lockdep-splat-in-btrfs_recover_relocation.patch +mmc-core-don-t-initialize-block-size-from-ext_csd-if-not-present.patch +mmc-sdhci-xenon-fix-1.8v-regulator-stabilization.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch +dm-integrity-fix-a-crash-if-recalculate-used-without-internal_hash.patch +drm-atomic-put-state-on-error-path.patch diff --git a/queue-4.4/acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch b/queue-4.4/acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch new file mode 100644 index 00000000000..a6893f3ed3a --- /dev/null +++ b/queue-4.4/acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch @@ -0,0 +1,48 @@ +From 78a18fec5258c8df9435399a1ea022d73d3eceb9 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 15 Jan 2021 22:57:52 +0100 +Subject: ACPI: scan: Make acpi_bus_get_device() clear return pointer on error + +From: Hans de Goede + +commit 78a18fec5258c8df9435399a1ea022d73d3eceb9 upstream. + +Set the acpi_device pointer which acpi_bus_get_device() returns-by- +reference to NULL on errors. + +We've recently had 2 cases where callers of acpi_bus_get_device() +did not properly error check the return value, so set the returned- +by-reference acpi_device pointer to NULL, because at least some +callers of acpi_bus_get_device() expect that to be done on errors. + +[ rjw: This issue was exposed by commit 71da201f38df ("ACPI: scan: + Defer enumeration of devices with _DEP lists") which caused it to + be much more likely to occur on some systems, but the real defect + had been introduced by an earlier commit. ] + +Fixes: 40e7fcb19293 ("ACPI: Add _DEP support to fix battery issue on Asus T100TA") +Fixes: bcfcd409d4db ("usb: split code locating ACPI companion into port and device") +Reported-by: Pierre-Louis Bossart +Tested-by: Pierre-Louis Bossart +Diagnosed-by: Rafael J. Wysocki +Signed-off-by: Hans de Goede +Cc: All applicable +[ rjw: Subject and changelog edits ] +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/scan.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/acpi/scan.c ++++ b/drivers/acpi/scan.c +@@ -564,6 +564,8 @@ static int acpi_get_device_data(acpi_han + if (!device) + return -EINVAL; + ++ *device = NULL; ++ + status = acpi_get_data_full(handle, acpi_scan_drop_device, + (void **)device, callback); + if (ACPI_FAILURE(status) || !*device) { diff --git a/queue-4.4/alsa-hda-via-add-minimum-mute-flag.patch b/queue-4.4/alsa-hda-via-add-minimum-mute-flag.patch new file mode 100644 index 00000000000..8b65c42a72b --- /dev/null +++ b/queue-4.4/alsa-hda-via-add-minimum-mute-flag.patch @@ -0,0 +1,33 @@ +From 67ea698c3950d10925be33c21ca49ffb64e21842 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Thu, 14 Jan 2021 08:24:53 +0100 +Subject: ALSA: hda/via: Add minimum mute flag + +From: Takashi Iwai + +commit 67ea698c3950d10925be33c21ca49ffb64e21842 upstream. + +It turned out that VIA codecs also mute the sound in the lowest mixer +level. Turn on the dac_min_mute flag to indicate the mute-as-minimum +in TLV like already done in Conexant and IDT codecs. + +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=210559 +Cc: +Link: https://lore.kernel.org/r/20210114072453.11379-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_via.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_via.c ++++ b/sound/pci/hda/patch_via.c +@@ -135,6 +135,7 @@ static struct via_spec *via_new_spec(str + spec->codec_type = VT1708S; + spec->gen.indep_hp = 1; + spec->gen.keep_eapd_on = 1; ++ spec->gen.dac_min_mute = 1; + spec->gen.pcm_playback_hook = via_playback_pcm_hook; + spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO; + codec->power_save_node = 1; diff --git a/queue-4.4/alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch b/queue-4.4/alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch new file mode 100644 index 00000000000..1318e67d426 --- /dev/null +++ b/queue-4.4/alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch @@ -0,0 +1,38 @@ +From 217bfbb8b0bfa24619b11ab75c135fec99b99b20 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 15 Jan 2021 10:34:28 +0100 +Subject: ALSA: seq: oss: Fix missing error check in snd_seq_oss_synth_make_info() + +From: Takashi Iwai + +commit 217bfbb8b0bfa24619b11ab75c135fec99b99b20 upstream. + +snd_seq_oss_synth_make_info() didn't check the error code from +snd_seq_oss_midi_make_info(), and this leads to the call of strlcpy() +with the uninitialized string as the source, which may lead to the +access over the limit. + +Add the proper error check for avoiding the failure. + +Reported-by: syzbot+e42504ff21cff05a595f@syzkaller.appspotmail.com +Cc: +Link: https://lore.kernel.org/r/20210115093428.15882-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/core/seq/oss/seq_oss_synth.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/sound/core/seq/oss/seq_oss_synth.c ++++ b/sound/core/seq/oss/seq_oss_synth.c +@@ -624,7 +624,8 @@ snd_seq_oss_synth_make_info(struct seq_o + + if (info->is_midi) { + struct midi_info minf; +- snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf); ++ if (snd_seq_oss_midi_make_info(dp, info->midi_mapped, &minf)) ++ return -ENXIO; + inf->synth_type = SYNTH_TYPE_MIDI; + inf->synth_subtype = 0; + inf->nr_voices = 16; diff --git a/queue-4.4/dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch b/queue-4.4/dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch new file mode 100644 index 00000000000..1d5ff08ac4c --- /dev/null +++ b/queue-4.4/dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch @@ -0,0 +1,66 @@ +From 809b1e4945774c9ec5619a8f4e2189b7b3833c0c Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Thu, 21 Jan 2021 18:50:56 +0100 +Subject: dm: avoid filesystem lookup in dm_get_dev_t() + +From: Hannes Reinecke + +commit 809b1e4945774c9ec5619a8f4e2189b7b3833c0c upstream. + +This reverts commit +644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()") + +dm_get_dev_t() is just used to convert an arbitrary 'path' string +into a dev_t. It doesn't presume that the device is present; that +check will be done later, as the only caller is dm_get_device(), +which does a dm_get_table_device() later on, which will properly +open the device. + +So if the path string already _is_ in major:minor representation +we can convert it directly, avoiding a recursion into the filesystem +to lookup the block device. + +This avoids a hang in multipath_message() when the filesystem is +inaccessible. + +Fixes: 644bda6f3460 ("dm table: fall back to getting device using name_to_dev_t()") +Cc: stable@vger.kernel.org +Signed-off-by: Hannes Reinecke +Signed-off-by: Martin Wilck +Reviewed-by: Christoph Hellwig +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-table.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +--- a/drivers/md/dm-table.c ++++ b/drivers/md/dm-table.c +@@ -393,14 +393,23 @@ int dm_get_device(struct dm_target *ti, + { + int r; + dev_t dev; ++ unsigned int major, minor; ++ char dummy; + struct dm_dev_internal *dd; + struct dm_table *t = ti->table; + + BUG_ON(!t); + +- dev = dm_get_dev_t(path); +- if (!dev) +- return -ENODEV; ++ if (sscanf(path, "%u:%u%c", &major, &minor, &dummy) == 2) { ++ /* Extract the major/minor numbers */ ++ dev = MKDEV(major, minor); ++ if (MAJOR(dev) != major || MINOR(dev) != minor) ++ return -EOVERFLOW; ++ } else { ++ dev = dm_get_dev_t(path); ++ if (!dev) ++ return -ENODEV; ++ } + + dd = find_device(&t->devices, dev); + if (!dd) { diff --git a/queue-4.4/series b/queue-4.4/series new file mode 100644 index 00000000000..908c113532b --- /dev/null +++ b/queue-4.4/series @@ -0,0 +1,4 @@ +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-via-add-minimum-mute-flag.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch diff --git a/queue-4.9/series b/queue-4.9/series new file mode 100644 index 00000000000..908c113532b --- /dev/null +++ b/queue-4.9/series @@ -0,0 +1,4 @@ +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-via-add-minimum-mute-flag.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch diff --git a/queue-5.10/series b/queue-5.10/series new file mode 100644 index 00000000000..b65ee76204b --- /dev/null +++ b/queue-5.10/series @@ -0,0 +1,34 @@ +scsi-target-tcmu-fix-use-after-free-of-se_cmd-priv.patch +mtd-rawnand-gpmi-fix-dst-bit-offset-when-extracting-raw-payload.patch +mtd-rawnand-nandsim-fix-the-logic-when-selecting-hamming-soft-ecc-engine.patch +i2c-tegra-wait-for-config-load-atomically-while-in-isr.patch +i2c-bpmp-tegra-ignore-unknown-i2c_m-flags.patch +platform-x86-i2c-multi-instantiate-don-t-create-platform-device-for-int3515-acpi-nodes.patch +platform-x86-ideapad-laptop-disable-touchpad_switch-for-elan0634.patch +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-realtek-limit-int-mic-boost-on-acer-aspire-e5-575t.patch +alsa-hda-via-add-minimum-mute-flag.patch +crypto-xor-fix-divide-error-in-do_xor_speed.patch +dm-crypt-fix-copy-and-paste-bug-in-crypt_alloc_req_aead.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +printk-fix-buffer-overflow-potential-for-print_text.patch +btrfs-don-t-get-an-eintr-during-drop_snapshot-for-reloc.patch +btrfs-do-not-double-free-backref-nodes-on-error.patch +btrfs-fix-lockdep-splat-in-btrfs_recover_relocation.patch +btrfs-don-t-clear-ret-in-btrfs_start_dirty_block_groups.patch +btrfs-send-fix-invalid-clone-operations-when-cloning-from-the-same-file-and-root.patch +fs-fix-lazytime-expiration-handling-in-__writeback_single_inode.patch +pinctrl-ingenic-fix-jz4760-support.patch +mmc-core-don-t-initialize-block-size-from-ext_csd-if-not-present.patch +mmc-sdhci-of-dwcmshc-fix-rpmb-access.patch +mmc-sdhci-xenon-fix-1.8v-regulator-stabilization.patch +mmc-sdhci-brcmstb-fix-mmc-timeout-errors-on-s5-suspend.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch +dm-integrity-fix-a-crash-if-recalculate-used-without-internal_hash.patch +dm-integrity-conditionally-disable-recalculate-feature.patch +drm-atomic-put-state-on-error-path.patch +drm-syncobj-fix-use-after-free.patch +drm-amdgpu-remove-gpu-info-firmware-of-green-sardine.patch +drm-amd-display-dcn2x-find-secondary-pipe-properly-in-mpo-odm-case.patch +drm-i915-gt-prevent-use-of-engine-wa_ctx-after-error.patch +drm-i915-check-for-rq-hwsp-validity-after-acquiring-rcu-lock.patch diff --git a/queue-5.4/series b/queue-5.4/series new file mode 100644 index 00000000000..76af7ebdbf3 --- /dev/null +++ b/queue-5.4/series @@ -0,0 +1,17 @@ +i2c-bpmp-tegra-ignore-unknown-i2c_m-flags.patch +platform-x86-i2c-multi-instantiate-don-t-create-platform-device-for-int3515-acpi-nodes.patch +platform-x86-ideapad-laptop-disable-touchpad_switch-for-elan0634.patch +alsa-seq-oss-fix-missing-error-check-in-snd_seq_oss_synth_make_info.patch +alsa-hda-via-add-minimum-mute-flag.patch +acpi-scan-make-acpi_bus_get_device-clear-return-pointer-on-error.patch +btrfs-don-t-get-an-eintr-during-drop_snapshot-for-reloc.patch +btrfs-fix-lockdep-splat-in-btrfs_recover_relocation.patch +btrfs-don-t-clear-ret-in-btrfs_start_dirty_block_groups.patch +btrfs-send-fix-invalid-clone-operations-when-cloning-from-the-same-file-and-root.patch +mmc-core-don-t-initialize-block-size-from-ext_csd-if-not-present.patch +mmc-sdhci-xenon-fix-1.8v-regulator-stabilization.patch +dm-avoid-filesystem-lookup-in-dm_get_dev_t.patch +dm-integrity-fix-a-crash-if-recalculate-used-without-internal_hash.patch +drm-atomic-put-state-on-error-path.patch +drm-syncobj-fix-use-after-free.patch +drm-i915-gt-prevent-use-of-engine-wa_ctx-after-error.patch