diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 20:12:05 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:17 -0400 |
commit | a05fb6cc573130915380e00d182a4c6571cec6b2 (patch) | |
tree | c67e626c5307d89e6d7e65d0b2f9834c3591edb2 /kernel/auditfilter.c | |
parent | e118e9c5638bbe877aa26b5cd2fd223cc24cdc8a (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.c | 6 |
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) | |||
945 | struct audit_watch *watch = entry->rule.watch; | 945 | struct audit_watch *watch = entry->rule.watch; |
946 | struct audit_tree *tree = entry->rule.tree; | 946 | struct audit_tree *tree = entry->rule.tree; |
947 | struct list_head *list; | 947 | struct list_head *list; |
948 | LIST_HEAD(inotify_unregister_list); | ||
949 | int ret = 0; | 948 | int ret = 0; |
950 | #ifdef CONFIG_AUDITSYSCALL | 949 | #ifdef CONFIG_AUDITSYSCALL |
951 | int dont_count = 0; | 950 | int dont_count = 0; |
@@ -965,7 +964,7 @@ static inline int audit_del_rule(struct audit_entry *entry) | |||
965 | } | 964 | } |
966 | 965 | ||
967 | if (e->rule.watch) | 966 | if (e->rule.watch) |
968 | audit_remove_watch_rule(&e->rule, &inotify_unregister_list); | 967 | audit_remove_watch_rule(&e->rule); |
969 | 968 | ||
970 | if (e->rule.tree) | 969 | if (e->rule.tree) |
971 | audit_remove_tree_rule(&e->rule); | 970 | audit_remove_tree_rule(&e->rule); |
@@ -983,9 +982,6 @@ static inline int audit_del_rule(struct audit_entry *entry) | |||
983 | #endif | 982 | #endif |
984 | mutex_unlock(&audit_filter_mutex); | 983 | mutex_unlock(&audit_filter_mutex); |
985 | 984 | ||
986 | if (!list_empty(&inotify_unregister_list)) | ||
987 | audit_watch_inotify_unregister(&inotify_unregister_list); | ||
988 | |||
989 | out: | 985 | out: |
990 | if (watch) | 986 | if (watch) |
991 | audit_put_watch(watch); /* match initial get */ | 987 | audit_put_watch(watch); /* match initial get */ |