From: Andrew Morton Cc: Ingo Molnar Cc: David Woodhouse Cc: Jens Axboe Signed-off-by: Andrew Morton --- kernel/audit.h | 3 ++- kernel/auditfilter.c | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff -puN kernel/auditfilter.c~sem2mutex-audit_netlink_sem-fix kernel/auditfilter.c --- devel/kernel/auditfilter.c~sem2mutex-audit_netlink_sem-fix 2006-01-13 21:53:56.000000000 -0800 +++ devel-akpm/kernel/auditfilter.c 2006-01-13 21:53:56.000000000 -0800 @@ -97,7 +97,7 @@ static int audit_compare_rule(struct aud /* Note that audit_add_rule and audit_del_rule are called via * audit_receive() in audit.c, and are protected by - * audit_netlink_sem. */ + * audit_netlink_mutex. */ static inline int audit_add_rule(struct audit_rule *rule, struct list_head *list) { @@ -146,7 +146,7 @@ static inline void audit_free_rule(struc /* Note that audit_add_rule and audit_del_rule are called via * audit_receive() in audit.c, and are protected by - * audit_netlink_sem. */ + * audit_netlink_mutex. */ static inline int audit_del_rule(struct audit_rule *rule, struct list_head *list) { @@ -175,10 +175,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 #include #include @@ -67,4 +68,4 @@ extern void audit_send_reply(int pi void *payload, int size); extern void audit_log_lost(const char *message); extern void audit_panic(const char *message); -extern struct semaphore audit_netlink_sem; +extern struct mutex audit_netlink_mutex; _