]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched: update task_struct->comm comment
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 1 Apr 2026 15:20:41 +0000 (17:20 +0200)
committerKees Cook <kees@kernel.org>
Wed, 1 Apr 2026 19:26:07 +0000 (12:26 -0700)
Since commit 3a3f61ce5e0b ("exec: Make sure task->comm is always
NUL-terminated"), __set_task_comm() is unlocked and no longer uses
strscpy_pad() - update the stale comment accordingly.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260401152039.724811-4-thorsten.blum@linux.dev
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/sched.h

index 074ad4ef3d81371ebd751d0010bae3de44ba1c83..43dfbcf1babe5ce0148de4f5a9eb6521e621905d 100644 (file)
@@ -1158,12 +1158,9 @@ struct task_struct {
        /*
         * executable name, excluding path.
         *
-        * - normally initialized begin_new_exec()
-        * - set it with set_task_comm()
-        *   - strscpy_pad() to ensure it is always NUL-terminated and
-        *     zero-padded
-        *   - task_lock() to ensure the operation is atomic and the name is
-        *     fully updated.
+        * - normally initialized by begin_new_exec()
+        * - set it with set_task_comm() to ensure it is always
+        *   NUL-terminated and zero-padded
         */
        char                            comm[TASK_COMM_LEN];