/* Returns the appropriate secid if there is one, otherwise 0  */
u32 smack_to_secid(const char *smack)
/* Returns the appropriate secid if there is one, otherwise 0  */
u32 smack_to_secid(const char *smack)
{
	struct smack_known *skp;
	rcu_read_lock();
	list_for_each_entry_rcu(skp, &smack_known_list, list) {
		if (strncmp(skp->smk_known, smack, SMK_MAXLEN) == 0) {
			rcu_read_unlock();
			return skp->smk_secid;
		}
	}
	rcu_read_unlock();
	return 0;
}