提交 ae7d45f5 编写于 作者: T Tomas Henzl 提交者: Martin K. Petersen

scsi: mpi3mr: Fix an issue found by KASAN

Write only correct size (32 instead of 64 bytes).

Link: https://lore.kernel.org/r/20230213193752.6859-1-thenzl@redhat.com
Fixes: 42fc9fee ("scsi: mpi3mr: Add helper functions to manage device's port")
Signed-off-by: NTomas Henzl <thenzl@redhat.com>
Acked-by: NSathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 c6f2e6b6
......@@ -1280,7 +1280,7 @@ void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc)
if (mrioc->sas_hba.enclosure_handle) {
if (!(mpi3mr_cfg_get_enclosure_pg0(mrioc, &ioc_status,
&encl_pg0, sizeof(dev_pg0),
&encl_pg0, sizeof(encl_pg0),
MPI3_ENCLOS_PGAD_FORM_HANDLE,
mrioc->sas_hba.enclosure_handle)) &&
(ioc_status == MPI3_IOCSTATUS_SUCCESS))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册