scsi: lpfc: Fix validation of bsg reply lengths
authorDick Kennedy <dick.kennedy@broadcom.com>
Mon, 3 Aug 2020 21:02:27 +0000 (14:02 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 5 Aug 2020 00:56:57 +0000 (20:56 -0400)
commitfeb3cc57fb63a2b3d3254e8c8ca3fe776c767d38
tree96e3b12ea1db3fc484ef497c4da1ca3d3f55787c
parent678768da988081a922b0645b9bd552f6cdd982cc
scsi: lpfc: Fix validation of bsg reply lengths

There are a couple of code areas which validate sufficient reply buffer
length, but the checks are using the request elements rather than the reply
elements.

Rework to validate using the reply structures.

Link: https://lore.kernel.org/r/20200803210229.23063-7-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_bsg.c