diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-07 23:51:38 -0800 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-03-20 14:08:55 -0500 |
commit | 5a0bbce58bb25bd756f7ec437319d6ed2201a18b (patch) | |
tree | d8b263248c3eaece9a1c906e02c0795794f480de /kernel/auditfilter.c | |
parent | 4023e020807ea249ae83f0d1d851b4c7cf0afd8a (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/auditfilter.c')
-rw-r--r-- | kernel/auditfilter.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c index b85fd8cce11..d3a8539f3a8 100644 --- a/kernel/auditfilter.c +++ b/kernel/auditfilter.c @@ -329,7 +329,7 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b) } /* Add rule to given filterlist if not a duplicate. Protected by - * audit_netlink_sem. */ + * audit_netlink_mutex. */ static inline int audit_add_rule(struct audit_entry *entry, struct list_head *list) { @@ -352,7 +352,7 @@ static inline int audit_add_rule(struct audit_entry *entry, } /* Remove an existing rule from filterlist. Protected by - * audit_netlink_sem. */ + * audit_netlink_mutex. */ static inline int audit_del_rule(struct audit_entry *entry, struct list_head *list) { @@ -383,10 +383,10 @@ static int audit_list(void *_dest) seq = dest[1]; kfree(dest); - down(&audit_netlink_sem); + mutex_lock(&audit_netlink_mutex); /* The *_rcu iterators not needed here because we are - always called with audit_netlink_sem held. */ + always called with audit_netlink_mutex held. */ for (i=0; i<AUDIT_NR_FILTERS; i++) { list_for_each_entry(entry, &audit_filter_list[i], list) { struct audit_rule *rule; @@ -401,7 +401,7 @@ static int audit_list(void *_dest) } audit_send_reply(pid, seq, AUDIT_LIST, 1, 1, NULL, 0); - up(&audit_netlink_sem); + mutex_unlock(&audit_netlink_mutex); return 0; } @@ -417,10 +417,10 @@ static int audit_list_rules(void *_dest) seq = dest[1]; kfree(dest); - down(&audit_netlink_sem); + mutex_lock(&audit_netlink_mutex); /* The *_rcu iterators not needed here because we are - always called with audit_netlink_sem held. */ + always called with audit_netlink_mutex held. */ for (i=0; i<AUDIT_NR_FILTERS; i++) { list_for_each_entry(e, &audit_filter_list[i], list) { struct audit_rule_data *data; @@ -435,7 +435,7 @@ static int audit_list_rules(void *_dest) } audit_send_reply(pid, seq, AUDIT_LIST_RULES, 1, 1, NULL, 0); - up(&audit_netlink_sem); + mutex_unlock(&audit_netlink_mutex); return 0; } |