tty: audit: Remove icanon mode from call chain
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Jan 2016 06:55:27 +0000 (22:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jan 2016 00:41:04 +0000 (16:41 -0800)
commit309426ae69cdf35b0d72a8bd59a5081f8ddccddd
treeab1c875ae4e292d7e897d672923c7d5da1ec23aa
parenteab25a5cd1f91b5c7991affe95f24ce188b8021f
tty: audit: Remove icanon mode from call chain

The tty termios bits cannot change while n_tty_read() is in the
i/o loop; the termios_rwsem ensures mutual exclusion with termios
changes in n_tty_set_termios(). Check L_ICANON() directly and
eliminate icanon parameter.

NB: tty_audit_add_data() => tty_audit_buf_get() => tty_audit_buf_alloc()
is a single path; ie., tty_audit_buf_get() and tty_audit_buf_alloc()
have no other callers.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_tty.c
drivers/tty/tty_audit.c
include/linux/tty.h