Skip to content

Commit 9c922b7

Browse files
eaibmzAlexander Gordeev
authored andcommitted
s390/ipl: Fix incorrect initialization of len fields in nvme reipl block
Use correct symbolic constants IPL_BP_NVME_LEN and IPL_BP0_NVME_LEN to initialize nvme reipl block when 'scp_data' sysfs attribute is being updated. This bug had not been detected before because the corresponding fcp and nvme symbolic constants are equal. Fixes: 23a457b ("s390: nvme reipl") Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Alexander Egorenkov <[email protected]> Signed-off-by: Alexander Gordeev <[email protected]>
1 parent 247576b commit 9c922b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/kernel/ipl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,8 +966,8 @@ static ssize_t reipl_nvme_scpdata_write(struct file *filp, struct kobject *kobj,
966966
scpdata_len += padding;
967967
}
968968

969-
reipl_block_nvme->hdr.len = IPL_BP_FCP_LEN + scpdata_len;
970-
reipl_block_nvme->nvme.len = IPL_BP0_FCP_LEN + scpdata_len;
969+
reipl_block_nvme->hdr.len = IPL_BP_NVME_LEN + scpdata_len;
970+
reipl_block_nvme->nvme.len = IPL_BP0_NVME_LEN + scpdata_len;
971971
reipl_block_nvme->nvme.scp_data_len = scpdata_len;
972972

973973
return count;

0 commit comments

Comments
 (0)