]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fs/proc/base.c: fix the wrong format specifier
authorzhang jiao <zhangjiao2@cmss.chinamobile.com>
Wed, 3 Sep 2025 08:39:47 +0000 (16:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 14 Sep 2025 00:32:54 +0000 (17:32 -0700)
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 <zhangjiao2@cmss.chinamobile.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Cc: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/proc/base.c

index 62d35631ba8c32c6618899abd074c1d4c29b4b7a..569c93c9f927dacdeaa7fe42859b4a46639a1744 100644 (file)
@@ -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