Audit is unlikely to be enabled; check first to exit asap.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
unsigned int audit_tty;
dev_t dev;
+ audit_tty = READ_ONCE(current->signal->audit_tty);
+ if (~audit_tty & AUDIT_TTY_ENABLE)
+ return;
+
if (unlikely(size == 0))
return;
&& tty->driver->subtype == PTY_TYPE_MASTER)
return;
- audit_tty = READ_ONCE(current->signal->audit_tty);
- if (~audit_tty & AUDIT_TTY_ENABLE)
- return;
if ((~audit_tty & AUDIT_TTY_LOG_PASSWD) && icanon && !L_ECHO(tty))
return;