]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2025 15:59:25 +0000 (17:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jun 2025 15:59:25 +0000 (17:59 +0200)
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

queue-6.12/cpufreq-amd-pstate-add-missing-null-ptr-check-in-amd_pstate_update.patch [new file with mode: 0644]
queue-6.12/input-sparcspkr-avoid-unannotated-fall-through.patch [new file with mode: 0644]
queue-6.12/series
queue-6.12/wifi-ath12k-clear-affinity-hint-before-calling-ath12k_pci_free_irq-in-error-path.patch [new file with mode: 0644]

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 (file)
index 0000000..f770cef
--- /dev/null
@@ -0,0 +1,36 @@
+From 426db24d4db2e4f0d6720aeb7795eafcb9e82640 Mon Sep 17 00:00:00 2001
+From: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
+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 <dhananjay.ugwekar@amd.com>
+
+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 <dhananjay.ugwekar@amd.com>
+Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
+Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
+Link: https://lore.kernel.org/r/20250205112523.201101-11-dhananjay.ugwekar@amd.com
+Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
+[Minor context change fixed.]
+Signed-off-by: Wenshan Lan <jetlan9@163.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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 (file)
index 0000000..a5fd6bd
--- /dev/null
@@ -0,0 +1,72 @@
+From 8b1d858cbd4e1800e9336404ba7892b5a721230d Mon Sep 17 00:00:00 2001
+From: WangYuli <wangyuli@uniontech.com>
+Date: Fri, 18 Apr 2025 18:37:18 -0700
+Subject: Input: sparcspkr - avoid unannotated fall-through
+
+From: WangYuli <wangyuli@uniontech.com>
+
+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 <wangyuli@uniontech.com>
+Link: https://lore.kernel.org/r/6730E40353C76908+20250415052439.155051-1-wangyuli@uniontech.com
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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)
index d51c5494310af683f8da89faf9c30312e766172c..4538049c9943b4c6813ef27ef573ea2395ad6ee6 100644 (file)
@@ -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 (file)
index 0000000..edced7f
--- /dev/null
@@ -0,0 +1,50 @@
+From b43b1e2c52db77c872bd60d30cdcc72c47df70c7 Mon Sep 17 00:00:00 2001
+From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
+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 <manivannan.sadhasivam@linaro.org>
+
+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 <manivannan.sadhasivam@linaro.org>
+Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
+Link: https://patch.msgid.link/20250225053447.16824-3-manivannan.sadhasivam@linaro.org
+Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
+Signed-off-by: Wenshan Lan <jetlan9@163.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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: