Lines Matching refs:dhchap_secret
419 if (!opts->dhchap_secret)
421 return sysfs_emit(buf, "%s\n", opts->dhchap_secret);
429 char *dhchap_secret;
431 if (!ctrl->opts->dhchap_secret)
438 dhchap_secret = kzalloc(count + 1, GFP_KERNEL);
439 if (!dhchap_secret)
441 memcpy(dhchap_secret, buf, count);
443 if (strcmp(dhchap_secret, opts->dhchap_secret)) {
447 ret = nvme_auth_generate_key(dhchap_secret, &key);
449 kfree(dhchap_secret);
452 kfree(opts->dhchap_secret);
453 opts->dhchap_secret = dhchap_secret;
460 kfree(dhchap_secret);
468 static DEVICE_ATTR(dhchap_secret, S_IRUGO | S_IWUSR,
487 char *dhchap_secret;
496 dhchap_secret = kzalloc(count + 1, GFP_KERNEL);
497 if (!dhchap_secret)
499 memcpy(dhchap_secret, buf, count);
501 if (strcmp(dhchap_secret, opts->dhchap_ctrl_secret)) {
505 ret = nvme_auth_generate_key(dhchap_secret, &key);
507 kfree(dhchap_secret);
511 opts->dhchap_ctrl_secret = dhchap_secret;
518 kfree(dhchap_secret);