]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: Check that space was properly alloced in copy_query_response
authorAvri Altman <avri.altman@wdc.com>
Tue, 21 May 2019 08:24:22 +0000 (11:24 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 5 Jun 2019 02:11:01 +0000 (22:11 -0400)
commitdbd0d39992359d7a6e7ee2b5dbcd7c2d10fb7af5
tree9c1981b0320774dadde4940aae2cb5973e2341b3
parent11e41152a79c71266eeed9f356d3e46608a404b4
scsi: ufs: Check that space was properly alloced in copy_query_response

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.

Fixes: e006f820c397 (ufs: query descriptor API)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Acked-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd.c