Patch "ASoC: Intel: Skylake: Shield against no-NHLT configurations" has been added to the 5.4-stable tree
gregkh at linuxfoundation.org
gregkh at linuxfoundation.org
Tue Dec 1 09:42:55 CET 2020
This is a note to let you know that I've just added the patch titled
ASoC: Intel: Skylake: Shield against no-NHLT configurations
to the 5.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
asoc-intel-skylake-shield-against-no-nhlt-configurations.patch
and it can be found in the queue-5.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable at vger.kernel.org> know about it.
>From foo at baz Tue Dec 1 09:41:56 AM CET 2020
From: Cezary Rojewski <cezary.rojewski at intel.com>
Date: Sun, 29 Nov 2020 12:41:44 +0100
Subject: ASoC: Intel: Skylake: Shield against no-NHLT configurations
To: stable at vger.kernel.org, linux-kernel at vger.kernel.org
Cc: alsa-devel at alsa-project.org, broonie at kernel.org, tiwai at suse.com, pierre-louis.bossart at linux.intel.com, mateusz.gorski at linux.intel.com, Cezary Rojewski <cezary.rojewski at intel.com>
Message-ID: <20201129114148.13772-5-cezary.rojewski at intel.com>
From: Cezary Rojewski <cezary.rojewski at intel.com>
commit 9e6c382f5a6161eb55115fb56614b9827f2e7da3 upstream.
Some configurations expose no NHLT table at all within their
/sys/firmware/acpi/tables. To prevent NULL-dereference errors from
occurring, adjust probe flow and append additional safety checks in
functions involved in NHLT lifecycle.
Signed-off-by: Cezary Rojewski <cezary.rojewski at intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Link: https://lore.kernel.org/r/20200305145314.32579-5-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie at kernel.org>
Cc: <stable at vger.kernel.org> # 5.4.x
Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
sound/soc/intel/skylake/skl-nhlt.c | 3 ++-
sound/soc/intel/skylake/skl.c | 9 +++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -182,7 +182,8 @@ void skl_nhlt_remove_sysfs(struct skl_de
{
struct device *dev = &skl->pci->dev;
- sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
+ if (skl->nhlt)
+ sysfs_remove_file(&dev->kobj, &dev_attr_platform_id.attr);
}
/*
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -632,6 +632,9 @@ static int skl_clock_device_register(str
struct platform_device_info pdevinfo = {NULL};
struct skl_clk_pdata *clk_pdata;
+ if (!skl->nhlt)
+ return 0;
+
clk_pdata = devm_kzalloc(&skl->pci->dev, sizeof(*clk_pdata),
GFP_KERNEL);
if (!clk_pdata)
@@ -1090,7 +1093,8 @@ out_dsp_free:
out_clk_free:
skl_clock_device_unregister(skl);
out_nhlt_free:
- intel_nhlt_free(skl->nhlt);
+ if (skl->nhlt)
+ intel_nhlt_free(skl->nhlt);
out_free:
skl_free(bus);
@@ -1139,7 +1143,8 @@ static void skl_remove(struct pci_dev *p
skl_dmic_device_unregister(skl);
skl_clock_device_unregister(skl);
skl_nhlt_remove_sysfs(skl);
- intel_nhlt_free(skl->nhlt);
+ if (skl->nhlt)
+ intel_nhlt_free(skl->nhlt);
skl_free(bus);
dev_set_drvdata(&pci->dev, NULL);
}
Patches currently in stable-queue which might be from cezary.rojewski at intel.com are
queue-5.4/asoc-intel-skylake-select-hda-configuration-permissively.patch
queue-5.4/asoc-intel-skylake-enable-codec-wakeup-during-chip-init.patch
queue-5.4/asoc-intel-allow-for-rom-init-retry-on-cnl-platforms.patch
queue-5.4/asoc-intel-skylake-await-purge-request-ack-on-cnl.patch
queue-5.4/asoc-intel-skylake-remove-superfluous-chip-initialization.patch
queue-5.4/asoc-intel-skylake-shield-against-no-nhlt-configurations.patch
queue-5.4/asoc-intel-multiple-i-o-pcm-format-support-for-pipe.patch
queue-5.4/asoc-intel-skylake-automatic-dmic-format-configuration-according-to-information-from-nhlt.patch
More information about the Alsa-devel
mailing list