From: Greg Kroah-Hartman Date: Tue, 17 Dec 2024 09:07:52 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v5.4.288~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46574e6fa6415292ab87b1b8f4a76dc6dccca157;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch --- diff --git a/queue-5.10/drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch b/queue-5.10/drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch new file mode 100644 index 00000000000..e6564b1110e --- /dev/null +++ b/queue-5.10/drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch @@ -0,0 +1,36 @@ +From 2828e5808bcd5aae7fdcd169cac1efa2701fa2dd Mon Sep 17 00:00:00 2001 +From: Jiasheng Jiang +Date: Wed, 27 Nov 2024 20:10:42 +0000 +Subject: drm/i915: Fix memory leak by correcting cache object name in error handler + +From: Jiasheng Jiang + +commit 2828e5808bcd5aae7fdcd169cac1efa2701fa2dd upstream. + +Replace "slab_priorities" with "slab_dependencies" in the error handler +to avoid memory leak. + +Fixes: 32eb6bcfdda9 ("drm/i915: Make request allocation caches global") +Cc: # v5.2+ +Signed-off-by: Jiasheng Jiang +Reviewed-by: Nirmoy Das +Reviewed-by: Andi Shyti +Signed-off-by: Andi Shyti +Link: https://patchwork.freedesktop.org/patch/msgid/20241127201042.29620-1-jiashengjiangcool@gmail.com +(cherry picked from commit 9bc5e7dc694d3112bbf0fa4c46ef0fa0f114937a) +Signed-off-by: Tvrtko Ursulin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/i915/i915_scheduler.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_scheduler.c ++++ b/drivers/gpu/drm/i915/i915_scheduler.c +@@ -538,6 +538,6 @@ int __init i915_global_scheduler_init(vo + return 0; + + err_priorities: +- kmem_cache_destroy(global.slab_priorities); ++ kmem_cache_destroy(global.slab_dependencies); + return -ENOMEM; + } diff --git a/queue-5.10/series b/queue-5.10/series index f7719b56e7d..2624abe7745 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -28,3 +28,5 @@ team-fix-feature-propagation-of-netif_f_gso_encap_al.patch acpica-events-evxfregn-don-t-release-the-contextmute.patch blk-iocost-avoid-using-clamp-on-inuse-in-__propagate.patch bpf-sync_linked_regs-must-preserve-subreg_def.patch +tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch +drm-i915-fix-memory-leak-by-correcting-cache-object-name-in-error-handler.patch diff --git a/queue-5.10/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch b/queue-5.10/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch new file mode 100644 index 00000000000..140d5332127 --- /dev/null +++ b/queue-5.10/tracing-kprobes-skip-symbol-counting-logic-for-module-symbols-in-create_local_trace_kprobe.patch @@ -0,0 +1,42 @@ +From kniv@yandex-team.ru Tue Dec 17 09:59:08 2024 +From: Nikolay Kuratov +Date: Mon, 16 Dec 2024 14:19:23 +0300 +Subject: tracing/kprobes: Skip symbol counting logic for module symbols in create_local_trace_kprobe() +To: stable@vger.kernel.org +Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Francis Laniel , Steven Rostedt , Mathieu Desnoyers , Nikolay Kuratov +Message-ID: <20241216111923.2547104-1-kniv@yandex-team.ru> + +From: Nikolay Kuratov + +commit b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols") +avoids checking number_of_same_symbols() for module symbol in +__trace_kprobe_create(), but create_local_trace_kprobe() should avoid this +check too. Doing this check leads to ENOENT for module_name:symbol_name +constructions passed over perf_event_open. + +No bug in newer kernels as it was fixed more generally by +commit 9d8616034f16 ("tracing/kprobes: Add symbol counting check when module loads") + +Link: https://lore.kernel.org/linux-trace-kernel/20240705161030.b3ddb33a8167013b9b1da202@kernel.org +Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols") +Signed-off-by: Nikolay Kuratov +Signed-off-by: Greg Kroah-Hartman +--- +v1 -> v2: + * Reword commit title and message + * Send for stable instead of mainline + + kernel/trace/trace_kprobe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/trace_kprobe.c ++++ b/kernel/trace/trace_kprobe.c +@@ -1872,7 +1872,7 @@ create_local_trace_kprobe(char *func, vo + int ret; + char *event; + +- if (func) { ++ if (func && !strchr(func, ':')) { + unsigned int count; + + count = number_of_same_symbols(func);