aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 44803f25b236..241aa8593fa8 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -804,10 +804,11 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
804 case AUDIT_TTY_GET: { 804 case AUDIT_TTY_GET: {
805 struct audit_tty_status s; 805 struct audit_tty_status s;
806 struct task_struct *tsk = current; 806 struct task_struct *tsk = current;
807 unsigned long flags;
807 808
808 spin_lock_irq(&tsk->sighand->siglock); 809 spin_lock_irqsave(&tsk->sighand->siglock, flags);
809 s.enabled = tsk->signal->audit_tty != 0; 810 s.enabled = tsk->signal->audit_tty != 0;
810 spin_unlock_irq(&tsk->sighand->siglock); 811 spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
811 812
812 audit_send_reply(NETLINK_CB(skb).portid, seq, 813 audit_send_reply(NETLINK_CB(skb).portid, seq,
813 AUDIT_TTY_GET, 0, 0, &s, sizeof(s)); 814 AUDIT_TTY_GET, 0, 0, &s, sizeof(s));
@@ -816,6 +817,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
816 case AUDIT_TTY_SET: { 817 case AUDIT_TTY_SET: {
817 struct audit_tty_status *s; 818 struct audit_tty_status *s;
818 struct task_struct *tsk = current; 819 struct task_struct *tsk = current;
820 unsigned long flags;
819 821
820 if (nlh->nlmsg_len < sizeof(struct audit_tty_status)) 822 if (nlh->nlmsg_len < sizeof(struct audit_tty_status))
821 return -EINVAL; 823 return -EINVAL;
@@ -823,9 +825,9 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
823 if (s->enabled != 0 && s->enabled != 1) 825 if (s->enabled != 0 && s->enabled != 1)
824 return -EINVAL; 826 return -EINVAL;
825 827
826 spin_lock_irq(&tsk->sighand->siglock); 828 spin_lock_irqsave(&tsk->sighand->siglock, flags);
827 tsk->signal->audit_tty = s->enabled != 0; 829 tsk->signal->audit_tty = s->enabled != 0;
828 spin_unlock_irq(&tsk->sighand->siglock); 830 spin_unlock_irqrestore(&tsk->sighand->siglock, flags);
829 break; 831 break;
830 } 832 }
831 default: 833 default: