aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-bridge.h
diff options
context:
space:
mode:
authorJames Smart <[email protected]>2021-04-21 16:45:11 -0700
committerMartin K. Petersen <[email protected]>2021-04-26 22:58:38 -0400
commite4ec10228fdf09b88ba018009f14a696fb50d3f2 (patch)
treea5cc7732965c7efd6f028c389f418cfbbe077221 /include/linux/fpga/fpga-bridge.h
parent83adbba746d1c8b6e3b07d73ae7815044804c96e (diff)
scsi: lpfc: Fix bad memory access during VPD DUMP mailbox command
The dump command for reading a region passes a requested read length specified in words (4-byte units). The response overwrites the same field with the actual number of bytes read. The mailbox handler for DUMP which reads VPD data (region 23) is treating the response field as if it were still a word_cnt, thus multiplying it by 4 to set the read's "length". Given the read value was calculated based on the size of the read buffer, the longer response length runs off the end of the buffer. Fix by reworking the code to use the response field as a byte count. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions