zipl/src: Fix add_component_file_range()

Fix add_component_file_range() to process components of all types
(not only of COMPONENT_TYPE_LOAD), similar to how it is going in
add_component_buffer().

Earlier components of COMPONENT_TYPE_SIGNATURE were processed only
by add_component_buffer(). Starting from 60bc1e3, signatures for
mirrors (i.e. base disks of #1 and larger ID) are processed also by
the function add_component_file_range(), which works incorrectly for
such type of components.

Fixes: 60bc1e38d0 ("zipl/src: Reuse data of buffer components in bootmap")
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Signed-off-by: Eduard Shishkin <edward6@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Eduard Shishkin
2026-06-11 12:21:09 +02:00
committed by Jan Höppner
parent f2902a1990
commit 4f622325ef

View File

@@ -413,8 +413,13 @@ static int add_component_file_range(struct install_set *bis,
*count -= DIV_ROUND_UP(trailer, info->phy_block_size);
}
/* Fill in component location */
location->addr = load_address;
location->size = *count * info->phy_block_size;
if (component_type_by_id(comp_id) == COMPONENT_TYPE_LOAD) {
location->addr = load_address;
location->size = *count * info->phy_block_size;
} else {
location->addr = 0;
location->size = 0;
}
/* Try to compact list */
*count = disk_compact_blocklist(*list, *count, info);
write_segment_table: