2 #include <linux/inotify.h>
3 #include <linux/namei.h>
4 #include <linux/mount.h>
5 #include <linux/kthread.h>
13 struct audit_chunk
*root
;
14 struct list_head chunks
;
15 struct list_head rules
;
16 struct list_head list
;
17 struct list_head same_root
;
23 struct list_head hash
;
24 struct inotify_watch watch
;
25 struct list_head trees
; /* with root here */
31 struct list_head list
;
32 struct audit_tree
*owner
;
33 unsigned index
; /* index; upper bit indicates 'will prune' */
37 static LIST_HEAD(tree_list
);
38 static LIST_HEAD(prune_list
);
41 * One struct chunk is attached to each inode of interest.
42 * We replace struct chunk on tagging/untagging.
43 * Rules have pointer to struct audit_tree.
44 * Rules have struct list_head rlist forming a list of rules over
46 * References to struct chunk are collected at audit_inode{,_child}()
47 * time and used in AUDIT_TREE rule matching.
48 * These references are dropped at the same time we are calling
49 * audit_free_names(), etc.
51 * Cyclic lists galore:
52 * tree.chunks anchors chunk.owners[].list hash_lock
53 * tree.rules anchors rule.rlist audit_filter_mutex
54 * chunk.trees anchors tree.same_root hash_lock
55 * chunk.hash is a hash with middle bits of watch.inode as
56 * a hash function. RCU, hash_lock
58 * tree is refcounted; one reference for "some rules on rules_list refer to
59 * it", one for each chunk with pointer to it.
61 * chunk is refcounted by embedded inotify_watch + .refs (non-zero refcount
62 * of watch contributes 1 to .refs).
64 * node.index allows to get from node.list to containing chunk.
65 * MSB of that sucker is stolen to mark taggings that we might have to
66 * revert - several operations have very unpleasant cleanup logics and
67 * that makes a difference. Some.
70 static struct inotify_handle
*rtree_ih
;
72 static struct audit_tree
*alloc_tree(const char *s
)
74 struct audit_tree
*tree
;
76 tree
= kmalloc(sizeof(struct audit_tree
) + strlen(s
) + 1, GFP_KERNEL
);
78 atomic_set(&tree
->count
, 1);
80 INIT_LIST_HEAD(&tree
->chunks
);
81 INIT_LIST_HEAD(&tree
->rules
);
82 INIT_LIST_HEAD(&tree
->list
);
83 INIT_LIST_HEAD(&tree
->same_root
);
85 strcpy(tree
->pathname
, s
);
90 static inline void get_tree(struct audit_tree
*tree
)
92 atomic_inc(&tree
->count
);
95 static void __put_tree(struct rcu_head
*rcu
)
97 struct audit_tree
*tree
= container_of(rcu
, struct audit_tree
, head
);
101 static inline void put_tree(struct audit_tree
*tree
)
103 if (atomic_dec_and_test(&tree
->count
))
104 call_rcu(&tree
->head
, __put_tree
);
107 /* to avoid bringing the entire thing in audit.h */
108 const char *audit_tree_path(struct audit_tree
*tree
)
110 return tree
->pathname
;
113 static struct audit_chunk
*alloc_chunk(int count
)
115 struct audit_chunk
*chunk
;
119 size
= offsetof(struct audit_chunk
, owners
) + count
* sizeof(struct node
);
120 chunk
= kzalloc(size
, GFP_KERNEL
);
124 INIT_LIST_HEAD(&chunk
->hash
);
125 INIT_LIST_HEAD(&chunk
->trees
);
126 chunk
->count
= count
;
127 atomic_long_set(&chunk
->refs
, 1);
128 for (i
= 0; i
< count
; i
++) {
129 INIT_LIST_HEAD(&chunk
->owners
[i
].list
);
130 chunk
->owners
[i
].index
= i
;
132 inotify_init_watch(&chunk
->watch
);
136 static void free_chunk(struct audit_chunk
*chunk
)
140 for (i
= 0; i
< chunk
->count
; i
++) {
141 if (chunk
->owners
[i
].owner
)
142 put_tree(chunk
->owners
[i
].owner
);
147 void audit_put_chunk(struct audit_chunk
*chunk
)
149 if (atomic_long_dec_and_test(&chunk
->refs
))
153 static void __put_chunk(struct rcu_head
*rcu
)
155 struct audit_chunk
*chunk
= container_of(rcu
, struct audit_chunk
, head
);
156 audit_put_chunk(chunk
);
159 enum {HASH_SIZE
= 128};
160 static struct list_head chunk_hash_heads
[HASH_SIZE
];
161 static __cacheline_aligned_in_smp
DEFINE_SPINLOCK(hash_lock
);
163 static inline struct list_head
*chunk_hash(const struct inode
*inode
)
165 unsigned long n
= (unsigned long)inode
/ L1_CACHE_BYTES
;
166 return chunk_hash_heads
+ n
% HASH_SIZE
;
169 /* hash_lock is held by caller */
170 static void insert_hash(struct audit_chunk
*chunk
)
172 struct list_head
*list
= chunk_hash(chunk
->watch
.inode
);
173 list_add_rcu(&chunk
->hash
, list
);
176 /* called under rcu_read_lock */
177 struct audit_chunk
*audit_tree_lookup(const struct inode
*inode
)
179 struct list_head
*list
= chunk_hash(inode
);
180 struct audit_chunk
*p
;
182 list_for_each_entry_rcu(p
, list
, hash
) {
183 if (p
->watch
.inode
== inode
) {
184 atomic_long_inc(&p
->refs
);
191 int audit_tree_match(struct audit_chunk
*chunk
, struct audit_tree
*tree
)
194 for (n
= 0; n
< chunk
->count
; n
++)
195 if (chunk
->owners
[n
].owner
== tree
)
200 /* tagging and untagging inodes with trees */
202 static struct audit_chunk
*find_chunk(struct node
*p
)
204 int index
= p
->index
& ~(1U<<31);
206 return container_of(p
, struct audit_chunk
, owners
[0]);
209 static void untag_chunk(struct node
*p
)
211 struct audit_chunk
*chunk
= find_chunk(p
);
212 struct audit_chunk
*new;
213 struct audit_tree
*owner
;
214 int size
= chunk
->count
- 1;
217 if (!pin_inotify_watch(&chunk
->watch
)) {
219 * Filesystem is shutting down; all watches are getting
220 * evicted, just take it off the node list for this
221 * tree and let the eviction logics take care of the
225 if (owner
->root
== chunk
) {
226 list_del_init(&owner
->same_root
);
229 list_del_init(&p
->list
);
235 spin_unlock(&hash_lock
);
238 * pin_inotify_watch() succeeded, so the watch won't go away
241 mutex_lock(&chunk
->watch
.inode
->inotify_mutex
);
243 mutex_unlock(&chunk
->watch
.inode
->inotify_mutex
);
251 spin_lock(&hash_lock
);
252 list_del_init(&chunk
->trees
);
253 if (owner
->root
== chunk
)
255 list_del_init(&p
->list
);
256 list_del_rcu(&chunk
->hash
);
257 spin_unlock(&hash_lock
);
258 inotify_evict_watch(&chunk
->watch
);
259 mutex_unlock(&chunk
->watch
.inode
->inotify_mutex
);
260 put_inotify_watch(&chunk
->watch
);
264 new = alloc_chunk(size
);
267 if (inotify_clone_watch(&chunk
->watch
, &new->watch
) < 0) {
273 spin_lock(&hash_lock
);
274 list_replace_init(&chunk
->trees
, &new->trees
);
275 if (owner
->root
== chunk
) {
276 list_del_init(&owner
->same_root
);
280 for (i
= j
= 0; j
<= size
; i
++, j
++) {
281 struct audit_tree
*s
;
282 if (&chunk
->owners
[j
] == p
) {
283 list_del_init(&p
->list
);
287 s
= chunk
->owners
[j
].owner
;
288 new->owners
[i
].owner
= s
;
289 new->owners
[i
].index
= chunk
->owners
[j
].index
- j
+ i
;
290 if (!s
) /* result of earlier fallback */
293 list_replace_init(&chunk
->owners
[j
].list
, &new->owners
[i
].list
);
296 list_replace_rcu(&chunk
->hash
, &new->hash
);
297 list_for_each_entry(owner
, &new->trees
, same_root
)
299 spin_unlock(&hash_lock
);
300 inotify_evict_watch(&chunk
->watch
);
301 mutex_unlock(&chunk
->watch
.inode
->inotify_mutex
);
302 put_inotify_watch(&chunk
->watch
);
306 // do the best we can
307 spin_lock(&hash_lock
);
308 if (owner
->root
== chunk
) {
309 list_del_init(&owner
->same_root
);
312 list_del_init(&p
->list
);
315 spin_unlock(&hash_lock
);
316 mutex_unlock(&chunk
->watch
.inode
->inotify_mutex
);
318 unpin_inotify_watch(&chunk
->watch
);
319 spin_lock(&hash_lock
);
322 static int create_chunk(struct inode
*inode
, struct audit_tree
*tree
)
324 struct audit_chunk
*chunk
= alloc_chunk(1);
328 if (inotify_add_watch(rtree_ih
, &chunk
->watch
, inode
, IN_IGNORED
| IN_DELETE_SELF
) < 0) {
333 mutex_lock(&inode
->inotify_mutex
);
334 spin_lock(&hash_lock
);
336 spin_unlock(&hash_lock
);
338 inotify_evict_watch(&chunk
->watch
);
339 mutex_unlock(&inode
->inotify_mutex
);
340 put_inotify_watch(&chunk
->watch
);
343 chunk
->owners
[0].index
= (1U << 31);
344 chunk
->owners
[0].owner
= tree
;
346 list_add(&chunk
->owners
[0].list
, &tree
->chunks
);
349 list_add(&tree
->same_root
, &chunk
->trees
);
352 spin_unlock(&hash_lock
);
353 mutex_unlock(&inode
->inotify_mutex
);
357 /* the first tagged inode becomes root of tree */
358 static int tag_chunk(struct inode
*inode
, struct audit_tree
*tree
)
360 struct inotify_watch
*watch
;
361 struct audit_tree
*owner
;
362 struct audit_chunk
*chunk
, *old
;
366 if (inotify_find_watch(rtree_ih
, inode
, &watch
) < 0)
367 return create_chunk(inode
, tree
);
369 old
= container_of(watch
, struct audit_chunk
, watch
);
371 /* are we already there? */
372 spin_lock(&hash_lock
);
373 for (n
= 0; n
< old
->count
; n
++) {
374 if (old
->owners
[n
].owner
== tree
) {
375 spin_unlock(&hash_lock
);
376 put_inotify_watch(&old
->watch
);
380 spin_unlock(&hash_lock
);
382 chunk
= alloc_chunk(old
->count
+ 1);
384 put_inotify_watch(&old
->watch
);
388 mutex_lock(&inode
->inotify_mutex
);
389 if (inotify_clone_watch(&old
->watch
, &chunk
->watch
) < 0) {
390 mutex_unlock(&inode
->inotify_mutex
);
391 put_inotify_watch(&old
->watch
);
395 spin_lock(&hash_lock
);
397 spin_unlock(&hash_lock
);
399 inotify_evict_watch(&chunk
->watch
);
400 mutex_unlock(&inode
->inotify_mutex
);
401 put_inotify_watch(&old
->watch
);
402 put_inotify_watch(&chunk
->watch
);
405 list_replace_init(&old
->trees
, &chunk
->trees
);
406 for (n
= 0, p
= chunk
->owners
; n
< old
->count
; n
++, p
++) {
407 struct audit_tree
*s
= old
->owners
[n
].owner
;
409 p
->index
= old
->owners
[n
].index
;
410 if (!s
) /* result of fallback in untag */
413 list_replace_init(&old
->owners
[n
].list
, &p
->list
);
415 p
->index
= (chunk
->count
- 1) | (1U<<31);
418 list_add(&p
->list
, &tree
->chunks
);
419 list_replace_rcu(&old
->hash
, &chunk
->hash
);
420 list_for_each_entry(owner
, &chunk
->trees
, same_root
)
425 list_add(&tree
->same_root
, &chunk
->trees
);
427 spin_unlock(&hash_lock
);
428 inotify_evict_watch(&old
->watch
);
429 mutex_unlock(&inode
->inotify_mutex
);
430 put_inotify_watch(&old
->watch
); /* pair to inotify_find_watch */
431 put_inotify_watch(&old
->watch
); /* and kill it */
435 static void kill_rules(struct audit_tree
*tree
)
437 struct audit_krule
*rule
, *next
;
438 struct audit_entry
*entry
;
439 struct audit_buffer
*ab
;
441 list_for_each_entry_safe(rule
, next
, &tree
->rules
, rlist
) {
442 entry
= container_of(rule
, struct audit_entry
, rule
);
444 list_del_init(&rule
->rlist
);
446 /* not a half-baked one */
447 ab
= audit_log_start(NULL
, GFP_KERNEL
, AUDIT_CONFIG_CHANGE
);
448 audit_log_format(ab
, "op=");
449 audit_log_string(ab
, "remove rule");
450 audit_log_format(ab
, " dir=");
451 audit_log_untrustedstring(ab
, rule
->tree
->pathname
);
452 audit_log_key(ab
, rule
->filterkey
);
453 audit_log_format(ab
, " list=%d res=1", rule
->listnr
);
456 list_del_rcu(&entry
->list
);
457 list_del(&entry
->rule
.list
);
458 call_rcu(&entry
->rcu
, audit_free_rule_rcu
);
464 * finish killing struct audit_tree
466 static void prune_one(struct audit_tree
*victim
)
468 spin_lock(&hash_lock
);
469 while (!list_empty(&victim
->chunks
)) {
472 p
= list_entry(victim
->chunks
.next
, struct node
, list
);
476 spin_unlock(&hash_lock
);
480 /* trim the uncommitted chunks from tree */
482 static void trim_marked(struct audit_tree
*tree
)
484 struct list_head
*p
, *q
;
485 spin_lock(&hash_lock
);
487 spin_unlock(&hash_lock
);
491 for (p
= tree
->chunks
.next
; p
!= &tree
->chunks
; p
= q
) {
492 struct node
*node
= list_entry(p
, struct node
, list
);
494 if (node
->index
& (1U<<31)) {
496 list_add(p
, &tree
->chunks
);
500 while (!list_empty(&tree
->chunks
)) {
503 node
= list_entry(tree
->chunks
.next
, struct node
, list
);
505 /* have we run out of marked? */
506 if (!(node
->index
& (1U<<31)))
511 if (!tree
->root
&& !tree
->goner
) {
513 spin_unlock(&hash_lock
);
514 mutex_lock(&audit_filter_mutex
);
516 list_del_init(&tree
->list
);
517 mutex_unlock(&audit_filter_mutex
);
520 spin_unlock(&hash_lock
);
524 static void audit_schedule_prune(void);
526 /* called with audit_filter_mutex */
527 int audit_remove_tree_rule(struct audit_krule
*rule
)
529 struct audit_tree
*tree
;
532 spin_lock(&hash_lock
);
533 list_del_init(&rule
->rlist
);
534 if (list_empty(&tree
->rules
) && !tree
->goner
) {
536 list_del_init(&tree
->same_root
);
538 list_move(&tree
->list
, &prune_list
);
540 spin_unlock(&hash_lock
);
541 audit_schedule_prune();
545 spin_unlock(&hash_lock
);
551 void audit_trim_trees(void)
553 struct list_head cursor
;
555 mutex_lock(&audit_filter_mutex
);
556 list_add(&cursor
, &tree_list
);
557 while (cursor
.next
!= &tree_list
) {
558 struct audit_tree
*tree
;
560 struct vfsmount
*root_mnt
;
562 struct list_head list
;
565 tree
= container_of(cursor
.next
, struct audit_tree
, list
);
568 list_add(&cursor
, &tree
->list
);
569 mutex_unlock(&audit_filter_mutex
);
571 err
= kern_path(tree
->pathname
, 0, &path
);
575 root_mnt
= collect_mounts(&path
);
580 list_add_tail(&list
, &root_mnt
->mnt_list
);
581 spin_lock(&hash_lock
);
582 list_for_each_entry(node
, &tree
->chunks
, list
) {
583 struct audit_chunk
*chunk
= find_chunk(node
);
584 struct inode
*inode
= chunk
->watch
.inode
;
585 struct vfsmount
*mnt
;
586 node
->index
|= 1U<<31;
587 list_for_each_entry(mnt
, &list
, mnt_list
) {
588 if (mnt
->mnt_root
->d_inode
== inode
) {
589 node
->index
&= ~(1U<<31);
594 spin_unlock(&hash_lock
);
597 list_del_init(&list
);
598 drop_collected_mounts(root_mnt
);
600 mutex_lock(&audit_filter_mutex
);
603 mutex_unlock(&audit_filter_mutex
);
606 static int is_under(struct vfsmount
*mnt
, struct dentry
*dentry
,
609 if (mnt
!= path
->mnt
) {
611 if (mnt
->mnt_parent
== mnt
)
613 if (mnt
->mnt_parent
== path
->mnt
)
615 mnt
= mnt
->mnt_parent
;
617 dentry
= mnt
->mnt_mountpoint
;
619 return is_subdir(dentry
, path
->dentry
);
622 int audit_make_tree(struct audit_krule
*rule
, char *pathname
, u32 op
)
625 if (pathname
[0] != '/' ||
626 rule
->listnr
!= AUDIT_FILTER_EXIT
||
628 rule
->inode_f
|| rule
->watch
|| rule
->tree
)
630 rule
->tree
= alloc_tree(pathname
);
636 void audit_put_tree(struct audit_tree
*tree
)
641 /* called with audit_filter_mutex */
642 int audit_add_tree_rule(struct audit_krule
*rule
)
644 struct audit_tree
*seed
= rule
->tree
, *tree
;
646 struct vfsmount
*mnt
, *p
;
647 struct list_head list
;
650 list_for_each_entry(tree
, &tree_list
, list
) {
651 if (!strcmp(seed
->pathname
, tree
->pathname
)) {
654 list_add(&rule
->rlist
, &tree
->rules
);
659 list_add(&tree
->list
, &tree_list
);
660 list_add(&rule
->rlist
, &tree
->rules
);
661 /* do not set rule->tree yet */
662 mutex_unlock(&audit_filter_mutex
);
664 err
= kern_path(tree
->pathname
, 0, &path
);
667 mnt
= collect_mounts(&path
);
673 list_add_tail(&list
, &mnt
->mnt_list
);
676 list_for_each_entry(p
, &list
, mnt_list
) {
677 err
= tag_chunk(p
->mnt_root
->d_inode
, tree
);
683 drop_collected_mounts(mnt
);
687 spin_lock(&hash_lock
);
688 list_for_each_entry(node
, &tree
->chunks
, list
)
689 node
->index
&= ~(1U<<31);
690 spin_unlock(&hash_lock
);
696 mutex_lock(&audit_filter_mutex
);
697 if (list_empty(&rule
->rlist
)) {
706 mutex_lock(&audit_filter_mutex
);
707 list_del_init(&tree
->list
);
708 list_del_init(&tree
->rules
);
713 int audit_tag_tree(char *old
, char *new)
715 struct list_head cursor
, barrier
;
718 struct vfsmount
*tagged
;
719 struct list_head list
;
720 struct vfsmount
*mnt
;
721 struct dentry
*dentry
;
724 err
= kern_path(new, 0, &path
);
727 tagged
= collect_mounts(&path
);
732 err
= kern_path(old
, 0, &path
);
734 drop_collected_mounts(tagged
);
737 mnt
= mntget(path
.mnt
);
738 dentry
= dget(path
.dentry
);
741 list_add_tail(&list
, &tagged
->mnt_list
);
743 mutex_lock(&audit_filter_mutex
);
744 list_add(&barrier
, &tree_list
);
745 list_add(&cursor
, &barrier
);
747 while (cursor
.next
!= &tree_list
) {
748 struct audit_tree
*tree
;
751 tree
= container_of(cursor
.next
, struct audit_tree
, list
);
754 list_add(&cursor
, &tree
->list
);
755 mutex_unlock(&audit_filter_mutex
);
757 err
= kern_path(tree
->pathname
, 0, &path
);
760 mutex_lock(&audit_filter_mutex
);
764 spin_lock(&vfsmount_lock
);
765 if (!is_under(mnt
, dentry
, &path
)) {
766 spin_unlock(&vfsmount_lock
);
769 mutex_lock(&audit_filter_mutex
);
772 spin_unlock(&vfsmount_lock
);
775 list_for_each_entry(p
, &list
, mnt_list
) {
776 failed
= tag_chunk(p
->mnt_root
->d_inode
, tree
);
783 mutex_lock(&audit_filter_mutex
);
787 mutex_lock(&audit_filter_mutex
);
788 spin_lock(&hash_lock
);
790 list_del(&tree
->list
);
791 list_add(&tree
->list
, &tree_list
);
793 spin_unlock(&hash_lock
);
797 while (barrier
.prev
!= &tree_list
) {
798 struct audit_tree
*tree
;
800 tree
= container_of(barrier
.prev
, struct audit_tree
, list
);
802 list_del(&tree
->list
);
803 list_add(&tree
->list
, &barrier
);
804 mutex_unlock(&audit_filter_mutex
);
808 spin_lock(&hash_lock
);
809 list_for_each_entry(node
, &tree
->chunks
, list
)
810 node
->index
&= ~(1U<<31);
811 spin_unlock(&hash_lock
);
817 mutex_lock(&audit_filter_mutex
);
822 mutex_unlock(&audit_filter_mutex
);
825 drop_collected_mounts(tagged
);
830 * That gets run when evict_chunk() ends up needing to kill audit_tree.
831 * Runs from a separate thread.
833 static int prune_tree_thread(void *unused
)
835 mutex_lock(&audit_cmd_mutex
);
836 mutex_lock(&audit_filter_mutex
);
838 while (!list_empty(&prune_list
)) {
839 struct audit_tree
*victim
;
841 victim
= list_entry(prune_list
.next
, struct audit_tree
, list
);
842 list_del_init(&victim
->list
);
844 mutex_unlock(&audit_filter_mutex
);
848 mutex_lock(&audit_filter_mutex
);
851 mutex_unlock(&audit_filter_mutex
);
852 mutex_unlock(&audit_cmd_mutex
);
856 static void audit_schedule_prune(void)
858 kthread_run(prune_tree_thread
, NULL
, "audit_prune_tree");
862 * ... and that one is done if evict_chunk() decides to delay until the end
863 * of syscall. Runs synchronously.
865 void audit_kill_trees(struct list_head
*list
)
867 mutex_lock(&audit_cmd_mutex
);
868 mutex_lock(&audit_filter_mutex
);
870 while (!list_empty(list
)) {
871 struct audit_tree
*victim
;
873 victim
= list_entry(list
->next
, struct audit_tree
, list
);
875 list_del_init(&victim
->list
);
877 mutex_unlock(&audit_filter_mutex
);
881 mutex_lock(&audit_filter_mutex
);
884 mutex_unlock(&audit_filter_mutex
);
885 mutex_unlock(&audit_cmd_mutex
);
889 * Here comes the stuff asynchronous to auditctl operations
892 /* inode->inotify_mutex is locked */
893 static void evict_chunk(struct audit_chunk
*chunk
)
895 struct audit_tree
*owner
;
896 struct list_head
*postponed
= audit_killed_trees();
904 mutex_lock(&audit_filter_mutex
);
905 spin_lock(&hash_lock
);
906 while (!list_empty(&chunk
->trees
)) {
907 owner
= list_entry(chunk
->trees
.next
,
908 struct audit_tree
, same_root
);
911 list_del_init(&owner
->same_root
);
912 spin_unlock(&hash_lock
);
915 list_move(&owner
->list
, &prune_list
);
918 list_move(&owner
->list
, postponed
);
920 spin_lock(&hash_lock
);
922 list_del_rcu(&chunk
->hash
);
923 for (n
= 0; n
< chunk
->count
; n
++)
924 list_del_init(&chunk
->owners
[n
].list
);
925 spin_unlock(&hash_lock
);
927 audit_schedule_prune();
928 mutex_unlock(&audit_filter_mutex
);
931 static void handle_event(struct inotify_watch
*watch
, u32 wd
, u32 mask
,
932 u32 cookie
, const char *dname
, struct inode
*inode
)
934 struct audit_chunk
*chunk
= container_of(watch
, struct audit_chunk
, watch
);
936 if (mask
& IN_IGNORED
) {
938 put_inotify_watch(watch
);
942 static void destroy_watch(struct inotify_watch
*watch
)
944 struct audit_chunk
*chunk
= container_of(watch
, struct audit_chunk
, watch
);
945 call_rcu(&chunk
->head
, __put_chunk
);
948 static const struct inotify_operations rtree_inotify_ops
= {
949 .handle_event
= handle_event
,
950 .destroy_watch
= destroy_watch
,
953 static int __init
audit_tree_init(void)
957 rtree_ih
= inotify_init(&rtree_inotify_ops
);
958 if (IS_ERR(rtree_ih
))
959 audit_panic("cannot initialize inotify handle for rectree watches");
961 for (i
= 0; i
< HASH_SIZE
; i
++)
962 INIT_LIST_HEAD(&chunk_hash_heads
[i
]);
966 __initcall(audit_tree_init
);