From: Dan Williams Date: Fri, 17 Jun 2011 00:20:35 +0000 (-0700) Subject: isci: fix smp response frame overrun X-Git-Tag: MMI-PSA29.97-13-9~19042^2~1^2~23 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5edc33480c1c363ab361a881f2957b9fba5185cf;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git isci: fix smp response frame overrun Due to a typo we currently copy way too much when copying over the response data, but since a request is likely backed by a full page allocation we don't corrupt live data. Signed-off-by: Dan Williams --- diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c index ebe160c83f91..f4fbca7b1fa3 100644 --- a/drivers/scsi/isci/request.c +++ b/drivers/scsi/isci/request.c @@ -1694,7 +1694,7 @@ scic_sds_io_request_frame_handler(struct scic_sds_request *sci_req, frame_index, &smp_resp); - word_cnt = (sizeof(struct smp_req) - SMP_RESP_HDR_SZ) / + word_cnt = (sizeof(struct smp_resp) - SMP_RESP_HDR_SZ) / sizeof(u32); sci_swab32_cpy(((u8 *) rsp_hdr) + SMP_RESP_HDR_SZ,