Lines Matching refs:entry
57 static void ima_free_key_entry(struct ima_key_entry *entry) in ima_free_key_entry() argument
59 if (entry) { in ima_free_key_entry()
60 kfree(entry->payload); in ima_free_key_entry()
61 kfree(entry->keyring_name); in ima_free_key_entry()
62 kfree(entry); in ima_free_key_entry()
72 struct ima_key_entry *entry; in ima_alloc_key_entry() local
74 entry = kzalloc(sizeof(*entry), GFP_KERNEL); in ima_alloc_key_entry()
75 if (entry) { in ima_alloc_key_entry()
76 entry->payload = kmemdup(payload, payload_len, GFP_KERNEL); in ima_alloc_key_entry()
77 entry->keyring_name = kstrdup(keyring->description, in ima_alloc_key_entry()
79 entry->payload_len = payload_len; in ima_alloc_key_entry()
82 if ((entry == NULL) || (entry->payload == NULL) || in ima_alloc_key_entry()
83 (entry->keyring_name == NULL)) { in ima_alloc_key_entry()
88 INIT_LIST_HEAD(&entry->list); in ima_alloc_key_entry()
96 ima_free_key_entry(entry); in ima_alloc_key_entry()
97 entry = NULL; in ima_alloc_key_entry()
100 return entry; in ima_alloc_key_entry()
107 struct ima_key_entry *entry; in ima_queue_key() local
109 entry = ima_alloc_key_entry(keyring, payload, payload_len); in ima_queue_key()
110 if (!entry) in ima_queue_key()
115 list_add_tail(&entry->list, &ima_keys); in ima_queue_key()
121 ima_free_key_entry(entry); in ima_queue_key()
134 struct ima_key_entry *entry, *tmp; in ima_process_queued_keys() local
159 list_for_each_entry_safe(entry, tmp, &ima_keys, list) { in ima_process_queued_keys()
161 process_buffer_measurement(NULL, entry->payload, in ima_process_queued_keys()
162 entry->payload_len, in ima_process_queued_keys()
163 entry->keyring_name, in ima_process_queued_keys()
165 entry->keyring_name); in ima_process_queued_keys()
166 list_del(&entry->list); in ima_process_queued_keys()
167 ima_free_key_entry(entry); in ima_process_queued_keys()