Lines Matching defs:klist
146 struct keyring_list *klist;
159 klist = rcu_dereference_check(keyring->payload.subscriptions,
162 if (klist) {
163 for (loop = klist->nkeys - 1; loop >= 0; loop--)
164 key_put(klist->keys[loop]);
165 kfree(klist);
176 struct keyring_list *klist;
184 klist = rcu_dereference(keyring->payload.subscriptions);
185 if (klist)
186 seq_printf(m, ": %u/%u", klist->nkeys, klist->maxkeys);
201 struct keyring_list *klist;
207 klist = rcu_dereference_locked_keyring(keyring);
208 if (klist) {
210 qty = klist->nkeys * sizeof(key_serial_t);
220 for (loop = 0; loop < klist->nkeys; loop++) {
221 key = klist->keys[loop];
484 struct keyring_list *klist;
494 klist = rcu_dereference(keyring->payload.subscriptions);
495 if (klist) {
496 for (loop = 0; loop < klist->nkeys; loop++) {
497 key = klist->keys[loop];
669 struct keyring_list *klist =
672 if (klist->delkey != USHRT_MAX)
673 key_put(klist->keys[klist->delkey]);
674 kfree(klist);
685 struct keyring_list *klist, *nklist;
706 klist = rcu_dereference_locked_keyring(keyring);
709 if (klist && klist->nkeys > 0) {
710 for (loop = klist->nkeys - 1; loop >= 0; loop--) {
711 if (klist->keys[loop]->type == type &&
712 strcmp(klist->keys[loop]->description,
717 size = sizeof(struct key *) * klist->maxkeys;
718 size += sizeof(*klist);
722 nklist = kmemdup(klist, size, GFP_KERNEL);
727 klist->delkey = nklist->delkey = loop;
739 if (klist && klist->nkeys < klist->maxkeys) {
745 if (klist)
746 max += klist->maxkeys;
751 size = sizeof(*klist) + sizeof(struct key *) * max;
761 if (klist) {
762 memcpy(nklist->keys, klist->keys,
763 sizeof(struct key *) * klist->nkeys);
764 nklist->delkey = klist->nkeys;
765 nklist->nkeys = klist->nkeys + 1;
766 klist->delkey = USHRT_MAX;
817 struct keyring_list *klist, *nklist;
824 klist = rcu_dereference_protected(keyring->payload.subscriptions,
841 if (klist) {
843 klist->delkey, klist->nkeys, klist->maxkeys);
844 call_rcu(&klist->rcu, keyring_unlink_rcu_disposal);
848 klist->keys[klist->nkeys] = key;
850 klist->nkeys++;
907 struct keyring_list *klist, *nklist;
919 klist = rcu_dereference_locked_keyring(keyring);
920 if (klist) {
922 for (loop = 0; loop < klist->nkeys; loop++)
923 if (klist->keys[loop] == key)
933 nklist = kmalloc(sizeof(*klist) +
934 sizeof(struct key *) * klist->maxkeys,
938 nklist->maxkeys = klist->maxkeys;
939 nklist->nkeys = klist->nkeys - 1;
943 &klist->keys[0],
948 &klist->keys[loop + 1],
960 klist->delkey = loop;
961 call_rcu(&klist->rcu, keyring_unlink_rcu_disposal);
983 struct keyring_list *klist;
986 klist = container_of(rcu, struct keyring_list, rcu);
988 for (loop = klist->nkeys - 1; loop >= 0; loop--)
989 key_put(klist->keys[loop]);
991 kfree(klist);
1002 struct keyring_list *klist;
1010 klist = rcu_dereference_locked_keyring(keyring);
1011 if (klist) {
1023 if (klist)
1024 call_rcu(&klist->rcu, keyring_clear_rcu_disposal);
1042 struct keyring_list *klist;
1044 klist = rcu_dereference_locked_keyring(keyring);
1049 if (klist) {
1051 call_rcu(&klist->rcu, keyring_clear_rcu_disposal);
1070 struct keyring_list *klist, *new;
1078 klist = rcu_dereference_locked_keyring(keyring);
1079 if (!klist)
1084 for (loop = klist->nkeys - 1; loop >= 0; loop--)
1085 if (!key_is_dead(klist->keys[loop], limit))
1088 if (keep == klist->nkeys)
1105 for (loop = klist->nkeys - 1; loop >= 0; loop--) {
1106 key = klist->keys[loop];
1129 call_rcu(&klist->rcu, keyring_clear_rcu_disposal);