From: Greg Kroah-Hartman Date: Fri, 15 Jan 2021 10:32:43 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.252~17 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bb57d642c6c5ec90dd8e30e33b83060d6971048b;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: block-rsxx-select-config_crc32.patch cpufreq-powernow-k8-pass-policy-rather-than-use-cpufreq_cpu_get.patch iommu-intel-fix-memleak-in-intel_irq_remapping_alloc.patch wil6210-select-config_crc32.patch --- diff --git a/queue-4.4/block-rsxx-select-config_crc32.patch b/queue-4.4/block-rsxx-select-config_crc32.patch new file mode 100644 index 00000000000..e2a1df0442b --- /dev/null +++ b/queue-4.4/block-rsxx-select-config_crc32.patch @@ -0,0 +1,33 @@ +From 36a106a4c1c100d55ba3d32a21ef748cfcd4fa99 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Sun, 3 Jan 2021 22:42:39 +0100 +Subject: block: rsxx: select CONFIG_CRC32 + +From: Arnd Bergmann + +commit 36a106a4c1c100d55ba3d32a21ef748cfcd4fa99 upstream. + +Without crc32, the driver fails to link: + +arm-linux-gnueabi-ld: drivers/block/rsxx/config.o: in function `rsxx_load_config': +config.c:(.text+0x124): undefined reference to `crc32_le' + +Fixes: 8722ff8cdbfa ("block: IBM RamSan 70/80 device driver") +Signed-off-by: Arnd Bergmann +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/block/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/block/Kconfig ++++ b/drivers/block/Kconfig +@@ -540,6 +540,7 @@ config BLK_DEV_RBD + config BLK_DEV_RSXX + tristate "IBM Flash Adapter 900GB Full Height PCIe Device Driver" + depends on PCI ++ select CRC32 + help + Device driver for IBM's high speed PCIe SSD + storage device: Flash Adapter 900GB Full Height. diff --git a/queue-4.4/cpufreq-powernow-k8-pass-policy-rather-than-use-cpufreq_cpu_get.patch b/queue-4.4/cpufreq-powernow-k8-pass-policy-rather-than-use-cpufreq_cpu_get.patch new file mode 100644 index 00000000000..b357696ba6c --- /dev/null +++ b/queue-4.4/cpufreq-powernow-k8-pass-policy-rather-than-use-cpufreq_cpu_get.patch @@ -0,0 +1,63 @@ +From 943bdd0cecad06da8392a33093230e30e501eccc Mon Sep 17 00:00:00 2001 +From: Colin Ian King +Date: Tue, 5 Jan 2021 10:19:57 +0000 +Subject: cpufreq: powernow-k8: pass policy rather than use cpufreq_cpu_get() + +From: Colin Ian King + +commit 943bdd0cecad06da8392a33093230e30e501eccc upstream. + +Currently there is an unlikely case where cpufreq_cpu_get() returns a +NULL policy and this will cause a NULL pointer dereference later on. + +Fix this by passing the policy to transition_frequency_fidvid() from +the caller and hence eliminating the need for the cpufreq_cpu_get() +and cpufreq_cpu_put(). + +Thanks to Viresh Kumar for suggesting the fix. + +Addresses-Coverity: ("Dereference null return") +Fixes: b43a7ffbf33b ("cpufreq: Notify all policy->cpus in cpufreq_notify_transition()") +Suggested-by: Viresh Kumar +Signed-off-by: Colin Ian King +Acked-by: Viresh Kumar +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/powernow-k8.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +--- a/drivers/cpufreq/powernow-k8.c ++++ b/drivers/cpufreq/powernow-k8.c +@@ -887,9 +887,9 @@ static int get_transition_latency(struct + + /* Take a frequency, and issue the fid/vid transition command */ + static int transition_frequency_fidvid(struct powernow_k8_data *data, +- unsigned int index) ++ unsigned int index, ++ struct cpufreq_policy *policy) + { +- struct cpufreq_policy *policy; + u32 fid = 0; + u32 vid = 0; + int res; +@@ -921,9 +921,6 @@ static int transition_frequency_fidvid(s + freqs.old = find_khz_freq_from_fid(data->currfid); + freqs.new = find_khz_freq_from_fid(fid); + +- policy = cpufreq_cpu_get(smp_processor_id()); +- cpufreq_cpu_put(policy); +- + cpufreq_freq_transition_begin(policy, &freqs); + res = transition_fid_vid(data, fid, vid); + cpufreq_freq_transition_end(policy, &freqs, res); +@@ -978,7 +975,7 @@ static long powernowk8_target_fn(void *a + + powernow_k8_acpi_pst_values(data, newstate); + +- ret = transition_frequency_fidvid(data, newstate); ++ ret = transition_frequency_fidvid(data, newstate, pol); + + if (ret) { + pr_err("transition frequency failed\n"); diff --git a/queue-4.4/iommu-intel-fix-memleak-in-intel_irq_remapping_alloc.patch b/queue-4.4/iommu-intel-fix-memleak-in-intel_irq_remapping_alloc.patch new file mode 100644 index 00000000000..2f4dd16b0f2 --- /dev/null +++ b/queue-4.4/iommu-intel-fix-memleak-in-intel_irq_remapping_alloc.patch @@ -0,0 +1,35 @@ +From ff2b46d7cff80d27d82f7f3252711f4ca1666129 Mon Sep 17 00:00:00 2001 +From: Dinghao Liu +Date: Tue, 5 Jan 2021 13:18:37 +0800 +Subject: iommu/intel: Fix memleak in intel_irq_remapping_alloc + +From: Dinghao Liu + +commit ff2b46d7cff80d27d82f7f3252711f4ca1666129 upstream. + +When irq_domain_get_irq_data() or irqd_cfg() fails +at i == 0, data allocated by kzalloc() has not been +freed before returning, which leads to memleak. + +Fixes: b106ee63abcc ("irq_remapping/vt-d: Enhance Intel IR driver to support hierarchical irqdomains") +Signed-off-by: Dinghao Liu +Acked-by: Lu Baolu +Link: https://lore.kernel.org/r/20210105051837.32118-1-dinghao.liu@zju.edu.cn +Signed-off-by: Will Deacon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/iommu/intel_irq_remapping.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/iommu/intel_irq_remapping.c ++++ b/drivers/iommu/intel_irq_remapping.c +@@ -1350,6 +1350,8 @@ static int intel_irq_remapping_alloc(str + irq_data = irq_domain_get_irq_data(domain, virq + i); + irq_cfg = irqd_cfg(irq_data); + if (!irq_data || !irq_cfg) { ++ if (!i) ++ kfree(data); + ret = -EINVAL; + goto out_free_data; + } diff --git a/queue-4.4/series b/queue-4.4/series index 1f6604e4b4f..3b06d027f1a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -10,3 +10,7 @@ net-fix-pmtu-check-in-nopmtudisc-mode.patch vmlinux.lds.h-add-pgo-and-autofdo-input-sections.patch ubifs-wbuf-don-t-leak-kernel-memory-to-flash.patch spi-pxa2xx-fix-use-after-free-on-unbind.patch +cpufreq-powernow-k8-pass-policy-rather-than-use-cpufreq_cpu_get.patch +wil6210-select-config_crc32.patch +block-rsxx-select-config_crc32.patch +iommu-intel-fix-memleak-in-intel_irq_remapping_alloc.patch diff --git a/queue-4.4/wil6210-select-config_crc32.patch b/queue-4.4/wil6210-select-config_crc32.patch new file mode 100644 index 00000000000..f49fdf87c87 --- /dev/null +++ b/queue-4.4/wil6210-select-config_crc32.patch @@ -0,0 +1,34 @@ +From e186620d7bf11b274b985b839c38266d7918cc05 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Sun, 3 Jan 2021 22:36:20 +0100 +Subject: wil6210: select CONFIG_CRC32 + +From: Arnd Bergmann + +commit e186620d7bf11b274b985b839c38266d7918cc05 upstream. + +Without crc32, the driver fails to link: + +arm-linux-gnueabi-ld: drivers/net/wireless/ath/wil6210/fw.o: in function `wil_fw_verify': +fw.c:(.text+0x74c): undefined reference to `crc32_le' +arm-linux-gnueabi-ld: drivers/net/wireless/ath/wil6210/fw.o:fw.c:(.text+0x758): more undefined references to `crc32_le' follow + +Fixes: 151a9706503f ("wil6210: firmware download") +Signed-off-by: Arnd Bergmann +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/wil6210/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/net/wireless/ath/wil6210/Kconfig ++++ b/drivers/net/wireless/ath/wil6210/Kconfig +@@ -1,6 +1,7 @@ + config WIL6210 + tristate "Wilocity 60g WiFi card wil6210 support" + select WANT_DEV_COREDUMP ++ select CRC32 + depends on CFG80211 + depends on PCI + default n