From 13f23538ef49a96a1b8ba9d61bd778de65f00613 Mon Sep 17 00:00:00 2001 From: zhang jiao Date: Wed, 3 Sep 2025 16:39:47 +0800 Subject: [PATCH] fs/proc/base.c: fix the wrong format specifier Use '%d' instead of '%u' for int. Link: https://lkml.kernel.org/r/20250903083948.2536-1-zhangjiao2@cmss.chinamobile.com Signed-off-by: zhang jiao Cc: Al Viro Cc: Christian Brauner Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Lorenzo Stoakes Cc: Thomas Gleinxer Cc: xu xin Signed-off-by: Andrew Morton --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/base.c b/fs/proc/base.c index 62d35631ba8c3..569c93c9f927d 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -3945,7 +3945,7 @@ static int proc_task_readdir(struct file *file, struct dir_context *ctx) tid = task_pid_nr_ns(task, ns); if (!tid) continue; /* The task has just exited. */ - len = snprintf(name, sizeof(name), "%u", tid); + len = snprintf(name, sizeof(name), "%d", tid); if (!proc_fill_cache(file, ctx, name, len, proc_task_instantiate, task, NULL)) { /* returning this tgid failed, save it as the first -- 2.47.3