]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
uprobes: uprobe_warn should use passed task
authorJeremy Linton <jeremy.linton@arm.com>
Mon, 25 Aug 2025 03:34:21 +0000 (22:34 -0500)
committerWill Deacon <will@kernel.org>
Tue, 16 Sep 2025 20:34:49 +0000 (21:34 +0100)
uprobe_warn() is passed a task structure, yet its using current. For
the most part this shouldn't matter, but since a task structure is
provided, lets use it.

Fixes: 248d3a7b2f10 ("uprobes: Change uprobe_copy_process() to dup return_instances")
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
kernel/events/uprobes.c

index 7ca1940607bd8340d2f4d1b74faccd40c1cfdc70..4b97d16f731c1a7ccd33e91d9cc4144635c6c817 100644 (file)
@@ -121,7 +121,7 @@ struct xol_area {
 
 static void uprobe_warn(struct task_struct *t, const char *msg)
 {
-       pr_warn("uprobe: %s:%d failed to %s\n", current->comm, current->pid, msg);
+       pr_warn("uprobe: %s:%d failed to %s\n", t->comm, t->pid, msg);
 }
 
 /*