Re: [RESEND PATCH v1 2/2] scsi: ufs: fix potential bug which ends in system hang-up

From: Bart Van Assche
Date: Tue Nov 12 2019 - 11:41:26 EST


On 11/11/19 4:22 PM, Bean Huo (beanhuo) wrote:

Bean Huo <beanhuo@xxxxxxxxxx>

In function __ufshcd_query_descriptor(), in the event of an error
happening, we directly goto out_unlock, and forget to invaliate
hba->dev_cmd.query.descriptor pointer. Thus results in this pointer
still validity in ufshcd_copy_query_response() for other query requests
which go through ufshcd_exec_raw_upiu_cmd(). This will cuases __memcpy()
crash and system hangs up, log shows as below:

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>