From a4eb03dfe1ca42d4c412c5e47659e4fa4c198990 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 10 Aug 2022 11:11:42 +0000 Subject: [PATCH] zipl: set kernel parmline only if it was specified MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before commit 5fb64345486f ("zipl: add get_common_components() and finalize_common_address_data()") the default kernel parmline was only overwritten if a parmline was specified. After the commit it was always overwritten, even if no parmline was specified. Let's change this behavior back by adding a NULL-pointer check. For dump types this change changes the behavior before commit 5fb64345486f ("zipl: add get_common_components() and finalize_common_address_data()"). Fixes: 5fb64345486f ("zipl: add get_common_components() and finalize_common_address_data()") Reviewed-by: Steffen Eiden Reviewed-by: Stefan Haberland Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zipl/src/job.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zipl/src/job.c b/zipl/src/job.c index 1eccc44f..fdffc492 100644 --- a/zipl/src/job.c +++ b/zipl/src/job.c @@ -561,11 +561,13 @@ get_common_components(struct job_common_ipl_data *common, MAXIMUM_PHYSICAL_BLOCKSIZE); if (rc) goto error; - rc = set_cl_element(&cl[num++], "parmline", NULL, &common->parm_addr, - MAXIMUM_PARMLINE_SIZE, 0, - MAXIMUM_PHYSICAL_BLOCKSIZE); - if (rc) - goto error; + if (common->parmline) { + rc = set_cl_element(&cl[num++], "parmline", NULL, &common->parm_addr, + MAXIMUM_PARMLINE_SIZE, 0, + MAXIMUM_PHYSICAL_BLOCKSIZE); + if (rc) + goto error; + } if (common->ramdisk) { rc = set_cl_element(&cl[num++], "initial ramdisk", common->ramdisk, &common->ramdisk_addr,