[PATCH 2/2] sched: update task_struct->comm comment

Thorsten Blum
2026-04-01T15:21:52Z

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>
---
include/linux/sched.h | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5a5d3dbc9cdf..f510b465db04 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1159,12 +1159,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];