summaryrefslogtreecommitdiff
path: root/kernel/auditfilter.c
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2009-12-17 20:12:05 -0500
committerEric Paris <eparis@redhat.com>2010-07-28 09:58:17 -0400
commita05fb6cc573130915380e00d182a4c6571cec6b2 (patch)
treec67e626c5307d89e6d7e65d0b2f9834c3591edb2 /kernel/auditfilter.c
parente118e9c5638bbe877aa26b5cd2fd223cc24cdc8a (diff)
audit: do not get and put just to free a watch
deleting audit watch rules is not currently done under audit_filter_mutex. It was done this way because we could not hold the mutex during inotify manipulation. Since we are using fsnotify we don't need to do the extra get/put pair nor do we need the private list on which to store the parents while they are about to be freed. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/auditfilter.c')
-rw-r--r--kernel/auditfilter.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index ac87577f36b5..eb7675499fb5 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -945,7 +945,6 @@ static inline int audit_del_rule(struct audit_entry *entry)
struct audit_watch *watch = entry->rule.watch;
struct audit_tree *tree = entry->rule.tree;
struct list_head *list;
- LIST_HEAD(inotify_unregister_list);
int ret = 0;
#ifdef CONFIG_AUDITSYSCALL
int dont_count = 0;
@@ -965,7 +964,7 @@ static inline int audit_del_rule(struct audit_entry *entry)
}
if (e->rule.watch)
- audit_remove_watch_rule(&e->rule, &inotify_unregister_list);
+ audit_remove_watch_rule(&e->rule);
if (e->rule.tree)
audit_remove_tree_rule(&e->rule);
@@ -983,9 +982,6 @@ static inline int audit_del_rule(struct audit_entry *entry)
#endif
mutex_unlock(&audit_filter_mutex);
- if (!list_empty(&inotify_unregister_list))
- audit_watch_inotify_unregister(&inotify_unregister_list);
-
out:
if (watch)
audit_put_watch(watch); /* match initial get */