]> git.baikalelectronics.ru Git - kernel.git/commit
tty: audit: Remove tty_audit_buf reference counting
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 10 Jan 2016 06:55:35 +0000 (22:55 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jan 2016 00:41:04 +0000 (16:41 -0800)
commitddfa6ee25ca532cc63b5f4990f6435d9bb79c1b2
treeea42cb5c3ae0c4eb5d218da59559b7390f922224
parente77e07e5137bf2ebd9f1824c32ce1977fb60ccec
tty: audit: Remove tty_audit_buf reference counting

When tty_audit_exit() is called from do_exit(), the process is
single-threaded. Since the tty_audit_buf is only shared by threads
of a process, no other thread can be concurrently accessing the
tty_audit_buf during or after tty_audit_exit().

Thus, no other thread can be holding an extra tty_audit_buf reference
which would prevent tty_audit_exit() from freeing the tty_audit_buf.
As that is the only purpose of the ref counting, remove the reference
counting and free the tty_audit_buf directly.

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