Lines Matching refs:sh_key
111 static void sctp_auth_shkey_destroy(struct sctp_shared_key *sh_key) in sctp_auth_shkey_destroy() argument
113 BUG_ON(!list_empty(&sh_key->key_list)); in sctp_auth_shkey_destroy()
114 sctp_auth_key_put(sh_key->key); in sctp_auth_shkey_destroy()
115 sh_key->key = NULL; in sctp_auth_shkey_destroy()
116 kfree(sh_key); in sctp_auth_shkey_destroy()
119 void sctp_auth_shkey_release(struct sctp_shared_key *sh_key) in sctp_auth_shkey_release() argument
121 if (refcount_dec_and_test(&sh_key->refcnt)) in sctp_auth_shkey_release()
122 sctp_auth_shkey_destroy(sh_key); in sctp_auth_shkey_release()
125 void sctp_auth_shkey_hold(struct sctp_shared_key *sh_key) in sctp_auth_shkey_hold() argument
127 refcount_inc(&sh_key->refcnt); in sctp_auth_shkey_hold()
372 struct sctp_shared_key *sh_key; in sctp_auth_asoc_copy_shkeys() local
377 key_for_each(sh_key, &ep->endpoint_shared_keys) { in sctp_auth_asoc_copy_shkeys()
378 new = sctp_auth_shkey_create(sh_key->key_id, gfp); in sctp_auth_asoc_copy_shkeys()
382 new->key = sh_key->key; in sctp_auth_asoc_copy_shkeys()