Skip to content

Commit ae7d45f

Browse files
thenzlmartinkpetersen
authored andcommitted
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: 42fc9fe ("scsi: mpi3mr: Add helper functions to manage device's port") Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent c6f2e6b commit ae7d45f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/scsi/mpi3mr/mpi3mr_transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ void mpi3mr_sas_host_add(struct mpi3mr_ioc *mrioc)
12801280

12811281
if (mrioc->sas_hba.enclosure_handle) {
12821282
if (!(mpi3mr_cfg_get_enclosure_pg0(mrioc, &ioc_status,
1283-
&encl_pg0, sizeof(dev_pg0),
1283+
&encl_pg0, sizeof(encl_pg0),
12841284
MPI3_ENCLOS_PGAD_FORM_HANDLE,
12851285
mrioc->sas_hba.enclosure_handle)) &&
12861286
(ioc_status == MPI3_IOCSTATUS_SUCCESS))

0 commit comments

Comments
 (0)