• Home
  • Raw
  • Download

Lines Matching refs:avc_cache

100 struct avc_cache {  struct
127 static struct avc_cache avc_cache; argument
237 INIT_LIST_HEAD(&avc_cache.slots[i]); in avc_init()
238 spin_lock_init(&avc_cache.slots_lock[i]); in avc_init()
240 atomic_set(&avc_cache.active_nodes, 0); in avc_init()
241 atomic_set(&avc_cache.lru_hint, 0); in avc_init()
259 if (!list_empty(&avc_cache.slots[i])) { in avc_get_hash_stats()
262 list_for_each_entry_rcu(node, &avc_cache.slots[i], list) in avc_get_hash_stats()
273 atomic_read(&avc_cache.active_nodes), in avc_get_hash_stats()
288 atomic_dec(&avc_cache.active_nodes); in avc_node_delete()
295 atomic_dec(&avc_cache.active_nodes); in avc_node_kill()
302 atomic_dec(&avc_cache.active_nodes); in avc_node_replace()
312 hvalue = atomic_inc_return(&avc_cache.lru_hint) & (AVC_CACHE_SLOTS - 1); in avc_reclaim_node()
314 if (!spin_trylock_irqsave(&avc_cache.slots_lock[hvalue], flags)) in avc_reclaim_node()
318 list_for_each_entry(node, &avc_cache.slots[hvalue], list) { in avc_reclaim_node()
326 spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flags); in avc_reclaim_node()
332 spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flags); in avc_reclaim_node()
351 if (atomic_inc_return(&avc_cache.active_nodes) > avc_cache_threshold) in avc_alloc_node()
372 list_for_each_entry_rcu(node, &avc_cache.slots[hvalue], list) { in avc_search_node()
433 if (seqno < avc_cache.latest_notif) { in avc_latest_notif_update()
435 seqno, avc_cache.latest_notif); in avc_latest_notif_update()
439 if (seqno > avc_cache.latest_notif) in avc_latest_notif_update()
440 avc_cache.latest_notif = seqno; in avc_latest_notif_update()
478 spin_lock_irqsave(&avc_cache.slots_lock[hvalue], flag); in avc_insert()
479 list_for_each_entry(pos, &avc_cache.slots[hvalue], list) { in avc_insert()
487 list_add_rcu(&node->list, &avc_cache.slots[hvalue]); in avc_insert()
489 spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flag); in avc_insert()
765 spin_lock_irqsave(&avc_cache.slots_lock[hvalue], flag); in avc_update_node()
767 list_for_each_entry(pos, &avc_cache.slots[hvalue], list) { in avc_update_node()
811 spin_unlock_irqrestore(&avc_cache.slots_lock[hvalue], flag); in avc_update_node()
828 spin_lock_irqsave(&avc_cache.slots_lock[i], flag); in avc_ss_reset()
834 list_for_each_entry(node, &avc_cache.slots[i], list) in avc_ss_reset()
837 spin_unlock_irqrestore(&avc_cache.slots_lock[i], flag); in avc_ss_reset()
950 return avc_cache.latest_notif; in avc_policy_seqno()