aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-08 02:51:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-03-20 14:08:55 -0500
commit5a0bbce58bb25bd756f7ec437319d6ed2201a18b (patch)
treed8b263248c3eaece9a1c906e02c0795794f480de /kernel/audit.c
parent4023e020807ea249ae83f0d1d851b4c7cf0afd8a (diff)
[PATCH] sem2mutex: audit_netlink_sem
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 4eb97b62d7fa..6a44e0a7707d 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -114,7 +114,7 @@ static DECLARE_WAIT_QUEUE_HEAD(audit_backlog_wait);
114/* The netlink socket is only to be read by 1 CPU, which lets us assume 114/* The netlink socket is only to be read by 1 CPU, which lets us assume
115 * that list additions and deletions never happen simultaneously in 115 * that list additions and deletions never happen simultaneously in
116 * auditsc.c */ 116 * auditsc.c */
117DECLARE_MUTEX(audit_netlink_sem); 117DEFINE_MUTEX(audit_netlink_mutex);
118 118
119/* AUDIT_BUFSIZ is the size of the temporary buffer used for formatting 119/* AUDIT_BUFSIZ is the size of the temporary buffer used for formatting
120 * audit records. Since printk uses a 1024 byte buffer, this buffer 120 * audit records. Since printk uses a 1024 byte buffer, this buffer
@@ -538,14 +538,14 @@ static void audit_receive(struct sock *sk, int length)
538 struct sk_buff *skb; 538 struct sk_buff *skb;
539 unsigned int qlen; 539 unsigned int qlen;
540 540
541 down(&audit_netlink_sem); 541 mutex_lock(&audit_netlink_mutex);
542 542
543 for (qlen = skb_queue_len(&sk->sk_receive_queue); qlen; qlen--) { 543 for (qlen = skb_queue_len(&sk->sk_receive_queue); qlen; qlen--) {
544 skb = skb_dequeue(&sk->sk_receive_queue); 544 skb = skb_dequeue(&sk->sk_receive_queue);
545 audit_receive_skb(skb); 545 audit_receive_skb(skb);
546 kfree_skb(skb); 546 kfree_skb(skb);
547 } 547 }
548 up(&audit_netlink_sem); 548 mutex_unlock(&audit_netlink_mutex);
549} 549}
550 550
551 551