Skip to content

Commit

Permalink
s390/ipl: Fix incorrect initialization of nvme dump block
Browse files Browse the repository at this point in the history
Initialize the correct fields of the nvme dump block.
This bug had not been detected before because first, the fcp and nvme fields
of struct ipl_parameter_block are part of the same union and, therefore,
overlap in memory and second, they are identical in structure and size.

Fixes: d70e38c ("s390: nvme dump support")
Reviewed-by: Heiko Carstens <[email protected]>
Signed-off-by: Alexander Egorenkov <[email protected]>
Signed-off-by: Alexander Gordeev <[email protected]>
  • Loading branch information
eaibmz authored and Alexander Gordeev committed May 14, 2024
1 parent 9c922b7 commit 7faacae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/s390/kernel/ipl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1862,9 +1862,9 @@ static int __init dump_nvme_init(void)
}
dump_block_nvme->hdr.len = IPL_BP_NVME_LEN;
dump_block_nvme->hdr.version = IPL_PARM_BLOCK_VERSION;
dump_block_nvme->fcp.len = IPL_BP0_NVME_LEN;
dump_block_nvme->fcp.pbt = IPL_PBT_NVME;
dump_block_nvme->fcp.opt = IPL_PB0_NVME_OPT_DUMP;
dump_block_nvme->nvme.len = IPL_BP0_NVME_LEN;
dump_block_nvme->nvme.pbt = IPL_PBT_NVME;
dump_block_nvme->nvme.opt = IPL_PB0_NVME_OPT_DUMP;
dump_capabilities |= DUMP_TYPE_NVME;
return 0;
}
Expand Down

0 comments on commit 7faacae

Please sign in to comment.