return 0;
}
-static void __nvme_auth_reset(struct nvme_dhchap_queue_context *chap)
+static void nvme_auth_reset_dhchap(struct nvme_dhchap_queue_context *chap)
{
kfree_sensitive(chap->host_response);
chap->host_response = NULL;
memset(chap->c2, 0, sizeof(chap->c2));
}
-static void __nvme_auth_free(struct nvme_dhchap_queue_context *chap)
+static void nvme_auth_free_dhchap(struct nvme_dhchap_queue_context *chap)
{
- __nvme_auth_reset(chap);
+ nvme_auth_reset_dhchap(chap);
if (chap->shash_tfm)
crypto_free_shash(chap->shash_tfm);
if (chap->dh_tfm)
dev_dbg(ctrl->device, "qid %d: re-using context\n", qid);
mutex_unlock(&ctrl->dhchap_auth_mutex);
flush_work(&chap->auth_work);
- __nvme_auth_reset(chap);
+ nvme_auth_reset_dhchap(chap);
queue_work(nvme_wq, &chap->auth_work);
return 0;
}
list_for_each_entry(chap, &ctrl->dhchap_auth_list, entry) {
mutex_unlock(&ctrl->dhchap_auth_mutex);
flush_work(&chap->auth_work);
- __nvme_auth_reset(chap);
+ nvme_auth_reset_dhchap(chap);
}
mutex_unlock(&ctrl->dhchap_auth_mutex);
}
list_for_each_entry_safe(chap, tmp, &ctrl->dhchap_auth_list, entry) {
list_del_init(&chap->entry);
flush_work(&chap->auth_work);
- __nvme_auth_free(chap);
+ nvme_auth_free_dhchap(chap);
}
mutex_unlock(&ctrl->dhchap_auth_mutex);
if (ctrl->host_key) {