]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2021 09:10:15 +0000 (10:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2021 09:10:15 +0000 (10:10 +0100)
added patches:
arm64-tegra-add-power-domain-for-tegra210-hda.patch
ntfs-check-for-valid-standard-information-attribute.patch

queue-4.14/arm64-tegra-add-power-domain-for-tegra210-hda.patch [new file with mode: 0644]
queue-4.14/ntfs-check-for-valid-standard-information-attribute.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/arm64-tegra-add-power-domain-for-tegra210-hda.patch b/queue-4.14/arm64-tegra-add-power-domain-for-tegra210-hda.patch
new file mode 100644 (file)
index 0000000..8754aec
--- /dev/null
@@ -0,0 +1,46 @@
+From 1e0ca5467445bc1f41a9e403d6161a22f313dae7 Mon Sep 17 00:00:00 2001
+From: Sameer Pujar <spujar@nvidia.com>
+Date: Thu, 7 Jan 2021 10:36:10 +0530
+Subject: arm64: tegra: Add power-domain for Tegra210 HDA
+
+From: Sameer Pujar <spujar@nvidia.com>
+
+commit 1e0ca5467445bc1f41a9e403d6161a22f313dae7 upstream.
+
+HDA initialization is failing occasionally on Tegra210 and following
+print is observed in the boot log. Because of this probe() fails and
+no sound card is registered.
+
+  [16.800802] tegra-hda 70030000.hda: no codecs found!
+
+Codecs request a state change and enumeration by the controller. In
+failure cases this does not seem to happen as STATETS register reads 0.
+
+The problem seems to be related to the HDA codec dependency on SOR
+power domain. If it is gated during HDA probe then the failure is
+observed. Building Tegra HDA driver into kernel image avoids this
+failure but does not completely address the dependency part. Fix this
+problem by adding 'power-domains' DT property for Tegra210 HDA. Note
+that Tegra186 and Tegra194 HDA do this already.
+
+Fixes: 742af7e7a0a1 ("arm64: tegra: Add Tegra210 support")
+Depends-on: 96d1f078ff0 ("arm64: tegra: Add SOR power-domain for Tegra210")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Sameer Pujar <spujar@nvidia.com>
+Acked-by: Jon Hunter <jonathanh@nvidia.com>
+Signed-off-by: Thierry Reding <treding@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/arm64/boot/dts/nvidia/tegra210.dtsi |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
++++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
+@@ -810,6 +810,7 @@
+                        <&tegra_car 128>, /* hda2hdmi */
+                        <&tegra_car 111>; /* hda2codec_2x */
+               reset-names = "hda", "hda2hdmi", "hda2codec_2x";
++              power-domains = <&pd_sor>;
+               status = "disabled";
+       };
diff --git a/queue-4.14/ntfs-check-for-valid-standard-information-attribute.patch b/queue-4.14/ntfs-check-for-valid-standard-information-attribute.patch
new file mode 100644 (file)
index 0000000..48d7323
--- /dev/null
@@ -0,0 +1,43 @@
+From 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c Mon Sep 17 00:00:00 2001
+From: Rustam Kovhaev <rkovhaev@gmail.com>
+Date: Wed, 24 Feb 2021 12:00:30 -0800
+Subject: ntfs: check for valid standard information attribute
+
+From: Rustam Kovhaev <rkovhaev@gmail.com>
+
+commit 4dfe6bd94959222e18d512bdf15f6bf9edb9c27c upstream.
+
+Mounting a corrupted filesystem with NTFS resulted in a kernel crash.
+
+We should check for valid STANDARD_INFORMATION attribute offset and length
+before trying to access it
+
+Link: https://lkml.kernel.org/r/20210217155930.1506815-1-rkovhaev@gmail.com
+Link: https://syzkaller.appspot.com/bug?extid=c584225dabdea2f71969
+Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
+Reported-by: syzbot+c584225dabdea2f71969@syzkaller.appspotmail.com
+Tested-by: syzbot+c584225dabdea2f71969@syzkaller.appspotmail.com
+Acked-by: Anton Altaparmakov <anton@tuxera.com>
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ntfs/inode.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/fs/ntfs/inode.c
++++ b/fs/ntfs/inode.c
+@@ -661,6 +661,12 @@ static int ntfs_read_locked_inode(struct
+       }
+       a = ctx->attr;
+       /* Get the standard information attribute value. */
++      if ((u8 *)a + le16_to_cpu(a->data.resident.value_offset)
++                      + le32_to_cpu(a->data.resident.value_length) >
++                      (u8 *)ctx->mrec + vol->mft_record_size) {
++              ntfs_error(vi->i_sb, "Corrupt standard information attribute in inode.");
++              goto unm_err_out;
++      }
+       si = (STANDARD_INFORMATION*)((u8*)a +
+                       le16_to_cpu(a->data.resident.value_offset));
index 2c5690f80eebdb6ddbd671eb60d891f1b7500a8d..a4f9235afd4a08a36d42ebf5ba1baa008fc105ec 100644 (file)
@@ -1,2 +1,4 @@
 hid-make-arrays-usage-and-value-to-be-the-same.patch
 usb-quirks-add-quirk-to-start-video-capture-on-elmo-l-12f-document-camera-reliable.patch
+ntfs-check-for-valid-standard-information-attribute.patch
+arm64-tegra-add-power-domain-for-tegra210-hda.patch