/* Make sure all buffered data is written out and deallocate the buffer. Only needs to be called if current->signal-> */
void tty_audit_exit(void)
/* Make sure all buffered data is written out and deallocate the buffer. Only needs to be called if current->signal-> */
void tty_audit_exit(void)
{
	struct tty_audit_buf *buf;
	spin_lock_irq(&current->sighand->siglock);
	buf = current->signal->tty_audit_buf;
	current->signal->tty_audit_buf = NULL;
	spin_unlock_irq(&current->sighand->siglock);
	if (!buf)
		return;
	mutex_lock(&buf->mutex);
	tty_audit_buf_push_current(buf);
	mutex_unlock(&buf->mutex);
	tty_audit_buf_put(buf);
}