• Home
  • Raw
  • Download

Lines Matching refs:dhchap_secret

3835 	if (!opts->dhchap_secret)  in nvme_ctrl_dhchap_secret_show()
3837 return sysfs_emit(buf, "%s\n", opts->dhchap_secret); in nvme_ctrl_dhchap_secret_show()
3845 char *dhchap_secret; in nvme_ctrl_dhchap_secret_store() local
3847 if (!ctrl->opts->dhchap_secret) in nvme_ctrl_dhchap_secret_store()
3854 dhchap_secret = kzalloc(count + 1, GFP_KERNEL); in nvme_ctrl_dhchap_secret_store()
3855 if (!dhchap_secret) in nvme_ctrl_dhchap_secret_store()
3857 memcpy(dhchap_secret, buf, count); in nvme_ctrl_dhchap_secret_store()
3859 if (strcmp(dhchap_secret, opts->dhchap_secret)) { in nvme_ctrl_dhchap_secret_store()
3863 ret = nvme_auth_generate_key(dhchap_secret, &key); in nvme_ctrl_dhchap_secret_store()
3865 kfree(dhchap_secret); in nvme_ctrl_dhchap_secret_store()
3868 kfree(opts->dhchap_secret); in nvme_ctrl_dhchap_secret_store()
3869 opts->dhchap_secret = dhchap_secret; in nvme_ctrl_dhchap_secret_store()
3874 kfree(dhchap_secret); in nvme_ctrl_dhchap_secret_store()
3881 static DEVICE_ATTR(dhchap_secret, S_IRUGO | S_IWUSR,
3900 char *dhchap_secret; in nvme_ctrl_dhchap_ctrl_secret_store() local
3909 dhchap_secret = kzalloc(count + 1, GFP_KERNEL); in nvme_ctrl_dhchap_ctrl_secret_store()
3910 if (!dhchap_secret) in nvme_ctrl_dhchap_ctrl_secret_store()
3912 memcpy(dhchap_secret, buf, count); in nvme_ctrl_dhchap_ctrl_secret_store()
3914 if (strcmp(dhchap_secret, opts->dhchap_ctrl_secret)) { in nvme_ctrl_dhchap_ctrl_secret_store()
3918 ret = nvme_auth_generate_key(dhchap_secret, &key); in nvme_ctrl_dhchap_ctrl_secret_store()
3920 kfree(dhchap_secret); in nvme_ctrl_dhchap_ctrl_secret_store()
3924 opts->dhchap_ctrl_secret = dhchap_secret; in nvme_ctrl_dhchap_ctrl_secret_store()
3929 kfree(dhchap_secret); in nvme_ctrl_dhchap_ctrl_secret_store()