RE: [PATCH] scsi: ufs: Check that space was properly alloced in copy_query_response

From: Avri Altman
Date: Mon Jun 03 2019 - 04:41:31 EST


Hi Alim,
Thank you for your review.
Sorry for the late response - I was away for a couple of weeks.

Thanks,
Avri

> Subject: Re: [PATCH] scsi: ufs: Check that space was properly alloced in
> copy_query_response
>
> Hi Avri
>
> On 5/21/19 1:54 PM, Avri Altman wrote:
> > struct ufs_dev_cmd is the main container that supports device management
> > commands. In the case of a read descriptor request, we assume that the
> > proper space was allocated in dev_cmd to hold the returning descriptor.
> >
> > This is no longer true, as there are flows that doesn't use dev_cmd
> > for device management requests, and was wrong in the first place.
> >
> Can you please put some light on those flows? Are those platform
> specific? Just curious.
No, actually its quite simplistic.
__ufshcd_query_descriptor set dev_cmd.query.descriptor
to point to its designated space before sending the read descriptor query,
and to null once it's done.
But it doesn't check it in ufshcd_copy_query_response when the query
returns from the device, which it should, as I indicated in the commit log.


> This change looks ok to me. I hope you have tested this patch.
Yes I did.

> Reviewed-by: Alim Akhtar <alim.akhtar@xxxxxxxxxxx>