Skip to content

Commit 9bf092c

Browse files
tobluxkees
authored andcommitted
sched: update task_struct->comm comment
Since commit 3a3f61c ("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>
1 parent 10cd675 commit 9bf092c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

include/linux/sched.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,12 +1158,9 @@ struct task_struct {
11581158
/*
11591159
* executable name, excluding path.
11601160
*
1161-
* - normally initialized begin_new_exec()
1162-
* - set it with set_task_comm()
1163-
* - strscpy_pad() to ensure it is always NUL-terminated and
1164-
* zero-padded
1165-
* - task_lock() to ensure the operation is atomic and the name is
1166-
* fully updated.
1161+
* - normally initialized by begin_new_exec()
1162+
* - set it with set_task_comm() to ensure it is always
1163+
* NUL-terminated and zero-padded
11671164
*/
11681165
char comm[TASK_COMM_LEN];
11691166

0 commit comments

Comments
 (0)