diff options
author | Jiri Slaby <jirislaby@kernel.org> | 2023-06-21 12:16:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-21 17:57:29 +0200 |
commit | 777e456852f729fa2942187a43a8eafbaecc6876 (patch) | |
tree | 8d525c65583a7b467de5d06b67b95c327c52a01a /drivers/tty/tty_audit.c | |
parent | Revert "8250: add support for ASIX devices with a FIFO bug" (diff) | |
download | linux-777e456852f729fa2942187a43a8eafbaecc6876.tar.xz linux-777e456852f729fa2942187a43a8eafbaecc6876.zip |
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>
Diffstat (limited to 'drivers/tty/tty_audit.c')
-rw-r--r-- | drivers/tty/tty_audit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index ca7afd7b2716..b98b1aef5f6f 100644 --- a/drivers/tty/tty_audit.c +++ b/drivers/tty/tty_audit.c @@ -69,7 +69,7 @@ static void tty_audit_log(const char *description, dev_t dev, ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_TTY); if (ab) { - char name[sizeof(current->comm)]; + char name[TASK_COMM_LEN]; audit_log_format(ab, "%s pid=%u uid=%u auid=%u ses=%u major=%d" " minor=%d comm=", description, pid, uid, |