]> git.baikalelectronics.ru Git - kernel.git/commit
tty: audit: Remove false memory optimization
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Jan 2016 06:55:34 +0000 (22:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jan 2016 00:41:04 +0000 (16:41 -0800)
commite77e07e5137bf2ebd9f1824c32ce1977fb60ccec
tree99a3eeda0a8244d8c1457da5c6cf1ccd60823501
parent3aef15f39d46cc17e1b548bf61b563a3be45cba4
tty: audit: Remove false memory optimization

The tty audit buffer is allocated at first use and not freed until
the process exits. If tty audit is turned off after the audit buffer
has been allocated, no effort is made to release the buffer.
So re-checking if tty audit has just been turned off when tty audit
was just on is false optimization; the likelihood of triggering this
condition is exceedingly small.

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