[PATCH 6/9] nvme-tcp: request secure channel concatenation

Mark O'Donovan shiftee at posteo.net
Tue Oct 15 15:30:45 PDT 2024


> +	tls_key = nvme_tls_psk_refresh(ctrl->opts->keyring, ctrl-
> >opts->host->nqn,
> +				       ctrl->opts->subsysnqn, chap-
> >hash_id,
> +				       tls_psk, psk_len, digest);
> +	if (IS_ERR(tls_key)) {
> +		ret = PTR_ERR(tls_key);
> +		dev_warn(ctrl->device,
> +			 "%s: qid %d failed to insert generated key,
> error %d\n",
> +			 __func__, chap->qid, ret);
> +		tls_key = NULL;
> +		kfree_sensitive(tls_psk);
> +	}

Should tls_psk be freed in the successful case also?

That is what happens in a similar situation in integrity_load_x509()



More information about the Linux-nvme mailing list