From: Greg Kroah-Hartman Date: Fri, 20 Jun 2025 15:59:25 +0000 (+0200) Subject: 6.12-stable patches X-Git-Tag: v5.4.295~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93c46ed2d15a1c754c97d2b58a68ca8efe88ffd3;p=thirdparty%2Fkernel%2Fstable-queue.git 6.12-stable patches added patches: cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch input-sparcspkr-avoid-unannotated-fall-through.patch wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch --- diff --git a/queue-6.12/cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch b/queue-6.12/cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch new file mode 100644 index 0000000000..f770cefa43 --- /dev/null +++ b/queue-6.12/cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch @@ -0,0 +1,36 @@ +From 426db24d4db2e4f0d6720aeb7795eafcb9e82640 Mon Sep 17 00:00:00 2001 +From: Dhananjay Ugwekar +Date: Wed, 5 Feb 2025 11:25:21 +0000 +Subject: cpufreq/amd-pstate: Add missing NULL ptr check in amd_pstate_update + +From: Dhananjay Ugwekar + +commit 426db24d4db2e4f0d6720aeb7795eafcb9e82640 upstream. + +Check if policy is NULL before dereferencing it in amd_pstate_update. + +Fixes: e8f555daacd3 ("cpufreq/amd-pstate: fix setting policy current frequency value") +Signed-off-by: Dhananjay Ugwekar +Reviewed-by: Mario Limonciello +Reviewed-by: Gautham R. Shenoy +Link: https://lore.kernel.org/r/20250205112523.201101-11-dhananjay.ugwekar@amd.com +Signed-off-by: Mario Limonciello +[Minor context change fixed.] +Signed-off-by: Wenshan Lan +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/amd-pstate.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/cpufreq/amd-pstate.c ++++ b/drivers/cpufreq/amd-pstate.c +@@ -482,6 +482,9 @@ static void amd_pstate_update(struct amd + u32 nominal_perf = READ_ONCE(cpudata->nominal_perf); + u64 value = prev; + ++ if (!policy) ++ return; ++ + min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf, + cpudata->max_limit_perf); + max_perf = clamp_t(unsigned long, max_perf, cpudata->min_limit_perf, diff --git a/queue-6.12/input-sparcspkr-avoid-unannotated-fall-through.patch b/queue-6.12/input-sparcspkr-avoid-unannotated-fall-through.patch new file mode 100644 index 0000000000..a5fd6bd864 --- /dev/null +++ b/queue-6.12/input-sparcspkr-avoid-unannotated-fall-through.patch @@ -0,0 +1,72 @@ +From 8b1d858cbd4e1800e9336404ba7892b5a721230d Mon Sep 17 00:00:00 2001 +From: WangYuli +Date: Fri, 18 Apr 2025 18:37:18 -0700 +Subject: Input: sparcspkr - avoid unannotated fall-through + +From: WangYuli + +commit 8b1d858cbd4e1800e9336404ba7892b5a721230d upstream. + +Fix follow warnings with clang-21i (and reformat for clarity): + drivers/input/misc/sparcspkr.c:78:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] + 78 | case SND_TONE: break; + | ^ + drivers/input/misc/sparcspkr.c:78:3: note: insert 'break;' to avoid fall-through + 78 | case SND_TONE: break; + | ^ + | break; + drivers/input/misc/sparcspkr.c:113:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] + 113 | case SND_TONE: break; + | ^ + drivers/input/misc/sparcspkr.c:113:3: note: insert 'break;' to avoid fall-through + 113 | case SND_TONE: break; + | ^ + | break; + 2 warnings generated. + +Signed-off-by: WangYuli +Link: https://lore.kernel.org/r/6730E40353C76908+20250415052439.155051-1-wangyuli@uniontech.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/misc/sparcspkr.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +--- a/drivers/input/misc/sparcspkr.c ++++ b/drivers/input/misc/sparcspkr.c +@@ -75,9 +75,14 @@ static int bbc_spkr_event(struct input_d + return -1; + + switch (code) { +- case SND_BELL: if (value) value = 1000; +- case SND_TONE: break; +- default: return -1; ++ case SND_BELL: ++ if (value) ++ value = 1000; ++ break; ++ case SND_TONE: ++ break; ++ default: ++ return -1; + } + + if (value > 20 && value < 32767) +@@ -113,9 +118,14 @@ static int grover_spkr_event(struct inpu + return -1; + + switch (code) { +- case SND_BELL: if (value) value = 1000; +- case SND_TONE: break; +- default: return -1; ++ case SND_BELL: ++ if (value) ++ value = 1000; ++ break; ++ case SND_TONE: ++ break; ++ default: ++ return -1; + } + + if (value > 20 && value < 32767) diff --git a/queue-6.12/series b/queue-6.12/series index d51c549431..4538049c99 100644 --- a/queue-6.12/series +++ b/queue-6.12/series @@ -325,3 +325,6 @@ sched_ext-sched-core-don-t-call-scx_group_set_weight-prematurely-from-sched_crea atm-revert-atm_account_tx-if-copy_from_iter_full-fails.patch wifi-rtw89-phy-add-dummy-c2h-event-handler-for-report-of-tas-power.patch x86-pkeys-simplify-pkru-update-in-signal-frame.patch +cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch +input-sparcspkr-avoid-unannotated-fall-through.patch +wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch diff --git a/queue-6.12/wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch b/queue-6.12/wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch new file mode 100644 index 0000000000..edced7fb26 --- /dev/null +++ b/queue-6.12/wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch @@ -0,0 +1,50 @@ +From b43b1e2c52db77c872bd60d30cdcc72c47df70c7 Mon Sep 17 00:00:00 2001 +From: Manivannan Sadhasivam +Date: Tue, 25 Feb 2025 11:04:46 +0530 +Subject: wifi: ath12k: Clear affinity hint before calling ath12k_pci_free_irq() in error path + +From: Manivannan Sadhasivam + +commit b43b1e2c52db77c872bd60d30cdcc72c47df70c7 upstream. + +If a shared IRQ is used by the driver due to platform limitation, then the +IRQ affinity hint is set right after the allocation of IRQ vectors in +ath12k_pci_msi_alloc(). This does no harm unless one of the functions +requesting the IRQ fails and attempt to free the IRQ. + +This may end up with a warning from the IRQ core that is expecting the +affinity hint to be cleared before freeing the IRQ: + +kernel/irq/manage.c: + + /* make sure affinity_hint is cleaned up */ + if (WARN_ON_ONCE(desc->affinity_hint)) + desc->affinity_hint = NULL; + +So to fix this issue, clear the IRQ affinity hint before calling +ath12k_pci_free_irq() in the error path. The affinity will be cleared once +again further down the error path due to code organization, but that does +no harm. + +Fixes: a3012f206d07 ("wifi: ath12k: set IRQ affinity to CPU0 in case of one MSI vector") +Signed-off-by: Manivannan Sadhasivam +Reviewed-by: Baochen Qiang +Link: https://patch.msgid.link/20250225053447.16824-3-manivannan.sadhasivam@linaro.org +Signed-off-by: Jeff Johnson +Signed-off-by: Wenshan Lan +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireless/ath/ath12k/pci.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/wireless/ath/ath12k/pci.c ++++ b/drivers/net/wireless/ath/ath12k/pci.c +@@ -1506,6 +1506,8 @@ static int ath12k_pci_probe(struct pci_d + return 0; + + err_free_irq: ++ /* __free_irq() expects the caller to have cleared the affinity hint */ ++ ath12k_pci_set_irq_affinity_hint(ab_pci, NULL); + ath12k_pci_free_irq(ab); + + err_ce_free: