/* Generate an audit message from the contents of @buf, which is owned by @tsk with @loginuid. @buf->mutex must be locked.  */
static void tty_audit_buf_push(struct task_struct *tsk, uid_t loginuid, unsigned int sessionid, struct tty_audit_buf *buf)
/* Generate an audit message from the contents of @buf, which is owned by @tsk with @loginuid. @buf->mutex must be locked.  */
static void tty_audit_buf_push(struct task_struct *tsk, uid_t loginuid, unsigned int sessionid, struct tty_audit_buf *buf)
{
	if (buf->valid == 0)
		return;
	if (audit_enabled == 0)
		return;
	tty_audit_log("tty", tsk, loginuid, sessionid, buf->major, buf->minor,
		      buf->data, buf->valid);
	buf->valid = 0;
}