Lines Matching refs:skp
356 struct smack_known *skp; in smk_import_entry() local
382 list_for_each_entry_rcu(skp, &smack_known_list, list) { in smk_import_entry()
383 if (strncmp(skp->smk_known, smack, SMK_MAXLEN) == 0) { in smk_import_entry()
390 skp = kzalloc(sizeof(struct smack_known), GFP_KERNEL); in smk_import_entry()
391 if (skp != NULL) { in smk_import_entry()
392 strncpy(skp->smk_known, smack, SMK_MAXLEN); in smk_import_entry()
393 skp->smk_secid = smack_next_secid++; in smk_import_entry()
394 skp->smk_cipso = NULL; in smk_import_entry()
395 spin_lock_init(&skp->smk_cipsolock); in smk_import_entry()
400 list_add_rcu(&skp->list, &smack_known_list); in smk_import_entry()
406 return skp; in smk_import_entry()
419 struct smack_known *skp; in smk_import() local
424 skp = smk_import_entry(string, len); in smk_import()
425 if (skp == NULL) in smk_import()
427 return skp->smk_known; in smk_import()
439 struct smack_known *skp; in smack_from_secid() local
442 list_for_each_entry_rcu(skp, &smack_known_list, list) { in smack_from_secid()
443 if (skp->smk_secid == secid) { in smack_from_secid()
445 return skp->smk_known; in smack_from_secid()
466 struct smack_known *skp; in smack_to_secid() local
469 list_for_each_entry_rcu(skp, &smack_known_list, list) { in smack_to_secid()
470 if (strncmp(skp->smk_known, smack, SMK_MAXLEN) == 0) { in smack_to_secid()
472 return skp->smk_secid; in smack_to_secid()