From: zhang jiao Date: Wed, 3 Sep 2025 08:39:47 +0000 (+0800) Subject: fs/proc/base.c: fix the wrong format specifier X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=13f23538ef49a96a1b8ba9d61bd778de65f00613;p=users%2Fhch%2Fmisc.git 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 --- diff --git a/fs/proc/base.c b/fs/proc/base.c index 62d35631ba8c..569c93c9f927 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