提交 bee0a224 编写于 作者: E Eric Paris

audit: do not needlessly take a lock in tty_audit_exit

We were doing spin_lock_irq and spin_unlock_irq.  This is STOOPID.

If we were in interupt context we were already screwed and called
panic() in do_exit().  So the irq stuff is useless.  Also, these values
can only be changed by receiving a netlink message from current.  Since
we are in do_exit() clearly we aren't in the syscall sending the netlink
message to change these values.  Thus, just read them and go with it.
Signed-off-by: NEric Paris <eparis@redhat.com>
上级 2ce88dd0
......@@ -111,12 +111,9 @@ static void tty_audit_buf_push(struct tty_audit_buf *buf)
void tty_audit_exit(void)
{
struct tty_audit_buf *buf;
unsigned long flags;
spin_lock_irqsave(&current->sighand->siglock, flags);
buf = current->signal->tty_audit_buf;
current->signal->tty_audit_buf = NULL;
spin_unlock_irqrestore(&current->sighand->siglock, flags);
if (!buf)
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册