Skip to content

Commit 777e456

Browse files
Jiri Slabygregkh
authored andcommitted
tty_audit: use TASK_COMM_LEN for task comm
This is the preferred way of declaring an array for get_task_comm(). Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230621101611.10580-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a82d62f commit 777e456

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/tty/tty_audit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static void tty_audit_log(const char *description, dev_t dev,
6969

7070
ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_TTY);
7171
if (ab) {
72-
char name[sizeof(current->comm)];
72+
char name[TASK_COMM_LEN];
7373

7474
audit_log_format(ab, "%s pid=%u uid=%u auid=%u ses=%u major=%d"
7575
" minor=%d comm=", description, pid, uid,

0 commit comments

Comments
 (0)