• Home
  • Raw
  • Download

Lines Matching refs:entry

214 static void cipso_v4_cache_entry_free(struct cipso_v4_map_cache_entry *entry)  in cipso_v4_cache_entry_free()  argument
216 if (entry->lsm_data) in cipso_v4_cache_entry_free()
217 netlbl_secattr_cache_free(entry->lsm_data); in cipso_v4_cache_entry_free()
218 kfree(entry->key); in cipso_v4_cache_entry_free()
219 kfree(entry); in cipso_v4_cache_entry_free()
278 struct cipso_v4_map_cache_entry *entry, *tmp_entry; in cipso_v4_cache_invalidate() local
283 list_for_each_entry_safe(entry, in cipso_v4_cache_invalidate()
286 list_del(&entry->list); in cipso_v4_cache_invalidate()
287 cipso_v4_cache_entry_free(entry); in cipso_v4_cache_invalidate()
321 struct cipso_v4_map_cache_entry *entry; in cipso_v4_cache_check() local
331 list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { in cipso_v4_cache_check()
332 if (entry->hash == hash && in cipso_v4_cache_check()
333 entry->key_len == key_len && in cipso_v4_cache_check()
334 memcmp(entry->key, key, key_len) == 0) { in cipso_v4_cache_check()
335 entry->activity += 1; in cipso_v4_cache_check()
336 atomic_inc(&entry->lsm_data->refcount); in cipso_v4_cache_check()
337 secattr->cache = entry->lsm_data; in cipso_v4_cache_check()
347 if (entry->activity > prev_entry->activity && in cipso_v4_cache_check()
348 entry->activity - prev_entry->activity > in cipso_v4_cache_check()
350 __list_del(entry->list.prev, entry->list.next); in cipso_v4_cache_check()
351 __list_add(&entry->list, in cipso_v4_cache_check()
359 prev_entry = entry; in cipso_v4_cache_check()
384 struct cipso_v4_map_cache_entry *entry = NULL; in cipso_v4_cache_add() local
393 entry = kzalloc(sizeof(*entry), GFP_ATOMIC); in cipso_v4_cache_add()
394 if (entry == NULL) in cipso_v4_cache_add()
396 entry->key = kmemdup(cipso_ptr, cipso_ptr_len, GFP_ATOMIC); in cipso_v4_cache_add()
397 if (entry->key == NULL) { in cipso_v4_cache_add()
401 entry->key_len = cipso_ptr_len; in cipso_v4_cache_add()
402 entry->hash = cipso_v4_map_cache_hash(cipso_ptr, cipso_ptr_len); in cipso_v4_cache_add()
404 entry->lsm_data = secattr->cache; in cipso_v4_cache_add()
406 bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETS - 1); in cipso_v4_cache_add()
409 list_add(&entry->list, &cipso_v4_cache[bkt].list); in cipso_v4_cache_add()
415 list_add(&entry->list, &cipso_v4_cache[bkt].list); in cipso_v4_cache_add()
423 if (entry) in cipso_v4_cache_add()
424 cipso_v4_cache_entry_free(entry); in cipso_v4_cache_add()
572 static void cipso_v4_doi_free_rcu(struct rcu_head *entry) in cipso_v4_doi_free_rcu() argument
576 doi_def = container_of(entry, struct cipso_v4_doi, rcu); in cipso_v4_doi_free_rcu()