Re: [PATCH v6 6/9] scsi: ufs: Add inline encryption support to UFS

Eric Biggers
2020-02-05T20:47:15Z

On Wed, Dec 18, 2019 at 06:51:33AM -0800, Satya Tangirala wrote:
> @@ -2472,6 +2492,13 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
> lrbp->task_tag = tag;
> lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun);
> lrbp->intr_cmd = !ufshcd_is_intr_aggr_allowed(hba) ? true : false;
> +
> + err = ufshcd_prepare_lrbp_crypto(hba, cmd, lrbp);
> + if (err) {
> + lrbp->cmd = NULL;
> + clear_bit_unlock(tag, &hba->lrb_in_use);
> + goto out;
> + }

The error path here is missing a call to ufshcd_release().

- Eric