diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-01-25 09:44:02 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-01-27 04:06:26 +0100 |
commit | bc2b4e68023174e508a4a9605384a7fda475f8a8 (patch) | |
tree | 05a11e780a43e517a244c6c02f0888e808acc902 /drivers/scsi | |
parent | Merge branch '5.11/scsi-fixes' into 5.12/scsi-queue (diff) | |
download | linux-bc2b4e68023174e508a4a9605384a7fda475f8a8.tar.xz linux-bc2b4e68023174e508a4a9605384a7fda475f8a8.zip |
scsi: qla2xxx: Fix some memory corruption
This was supposed to be "data" instead of "&data". The current code will
corrupt the stack.
Link: https://lore.kernel.org/r/YA6E0geUlL9Hs04A@mwanda
Fixes: dbf1f53cfd23 ("scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port")
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_bsg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index e45da05383cd..bee8cf9f8123 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xxx/qla_bsg.c @@ -2667,7 +2667,7 @@ qla2x00_get_tgt_stats(struct bsg_job *bsg_job) bsg_reply->reply_payload_rcv_len = sg_copy_from_buffer(bsg_job->reply_payload.sg_list, - bsg_job->reply_payload.sg_cnt, &data, + bsg_job->reply_payload.sg_cnt, data, sizeof(struct ql_vnd_tgt_stats_resp)); bsg_reply->result = DID_OK; |