]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 07:25:12 +0000 (09:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 07:25:12 +0000 (09:25 +0200)
added patches:
cpufreq-reference-count-policy-in-cpufreq_update_limits.patch
scripts-generate_rust_analyzer-add-ffi-crate.patch

queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch [new file with mode: 0644]
queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch [new file with mode: 0644]
queue-6.14/series

diff --git a/queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch b/queue-6.14/cpufreq-reference-count-policy-in-cpufreq_update_limits.patch
new file mode 100644 (file)
index 0000000..01f693b
--- /dev/null
@@ -0,0 +1,56 @@
+From 9e4e249018d208678888bdf22f6b652728106528 Mon Sep 17 00:00:00 2001
+From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Date: Fri, 28 Mar 2025 21:39:08 +0100
+Subject: cpufreq: Reference count policy in cpufreq_update_limits()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+
+commit 9e4e249018d208678888bdf22f6b652728106528 upstream.
+
+Since acpi_processor_notify() can be called before registering a cpufreq
+driver or even in cases when a cpufreq driver is not registered at all,
+cpufreq_update_limits() needs to check if a cpufreq driver is present
+and prevent it from being unregistered.
+
+For this purpose, make it call cpufreq_cpu_get() to obtain a cpufreq
+policy pointer for the given CPU and reference count the corresponding
+policy object, if present.
+
+Fixes: 5a25e3f7cc53 ("cpufreq: intel_pstate: Driver-specific handling of _PPC updates")
+Closes: https://lore.kernel.org/linux-acpi/Z-ShAR59cTow0KcR@mail-itl
+Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Cc: All applicable <stable@vger.kernel.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Link: https://patch.msgid.link/1928789.tdWV9SEqCh@rjwysocki.net
+[do not use __free(cpufreq_cpu_put) in a backport]
+Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/cpufreq/cpufreq.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/cpufreq/cpufreq.c
++++ b/drivers/cpufreq/cpufreq.c
+@@ -2780,10 +2780,18 @@ EXPORT_SYMBOL(cpufreq_update_policy);
+  */
+ void cpufreq_update_limits(unsigned int cpu)
+ {
++      struct cpufreq_policy *policy;
++
++      policy = cpufreq_cpu_get(cpu);
++      if (!policy)
++              return;
++
+       if (cpufreq_driver->update_limits)
+               cpufreq_driver->update_limits(cpu);
+       else
+               cpufreq_update_policy(cpu);
++
++      cpufreq_cpu_put(policy);
+ }
+ EXPORT_SYMBOL_GPL(cpufreq_update_limits);
diff --git a/queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch b/queue-6.14/scripts-generate_rust_analyzer-add-ffi-crate.patch
new file mode 100644 (file)
index 0000000..93fa88b
--- /dev/null
@@ -0,0 +1,55 @@
+From 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 Mon Sep 17 00:00:00 2001
+From: Lukas Fischer <kernel@o1oo11oo.de>
+Date: Fri, 4 Apr 2025 14:51:51 +0200
+Subject: scripts: generate_rust_analyzer: Add ffi crate
+
+From: Lukas Fischer <kernel@o1oo11oo.de>
+
+commit 05a2b0011c4b6cbbc9b577f6abebe4e9333b0cf6 upstream.
+
+Commit d072acda4862 ("rust: use custom FFI integer types") did not
+update rust-analyzer to include the new crate.
+
+To enable rust-analyzer support for these custom ffi types, add the
+`ffi` crate as a dependency to the `bindings`, `uapi` and `kernel`
+crates, which all directly depend on it.
+
+Fixes: d072acda4862 ("rust: use custom FFI integer types")
+Signed-off-by: Lukas Fischer <kernel@o1oo11oo.de>
+Reviewed-by: Tamir Duberstein <tamird@gmail.com>
+Cc: stable@vger.kernel.org
+Link: https://lore.kernel.org/r/20250404125150.85783-2-kernel@o1oo11oo.de
+Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ scripts/generate_rust_analyzer.py |   12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/scripts/generate_rust_analyzer.py
++++ b/scripts/generate_rust_analyzer.py
+@@ -97,6 +97,12 @@ def generate_crates(srctree, objtree, sy
+         ["core", "compiler_builtins"],
+     )
++    append_crate(
++        "ffi",
++        srctree / "rust" / "ffi.rs",
++        ["core", "compiler_builtins"],
++    )
++
+     def append_crate_with_generated(
+         display_name,
+         deps,
+@@ -116,9 +122,9 @@ def generate_crates(srctree, objtree, sy
+             "exclude_dirs": [],
+         }
+-    append_crate_with_generated("bindings", ["core"])
+-    append_crate_with_generated("uapi", ["core"])
+-    append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])
++    append_crate_with_generated("bindings", ["core", "ffi"])
++    append_crate_with_generated("uapi", ["core", "ffi"])
++    append_crate_with_generated("kernel", ["core", "macros", "build_error", "ffi", "bindings", "uapi"])
+     def is_root_crate(build_file, target):
+         try:
index bef1ac87e8f981ed9416ba35cff974c2553769cd..3435b888d08193ebd26ff321edc4c85848e31a95 100644 (file)
@@ -225,3 +225,5 @@ arm64-sysreg-add-register-fields-for-hfgitr2_el2.patch
 arm64-sysreg-add-register-fields-for-hfgrtr2_el2.patch
 arm64-sysreg-add-register-fields-for-hfgwtr2_el2.patch
 arm64-boot-enable-el2-requirements-for-feat_pmuv3p9.patch
+cpufreq-reference-count-policy-in-cpufreq_update_limits.patch
+scripts-generate_rust_analyzer-add-ffi-crate.patch