- zipl: Fix zfcpdump "struct job_ipl_data" initialization (#1058856)

This commit is contained in:
Dan Horák 2014-01-29 10:54:29 +01:00
parent c69f03294b
commit 26ce349f9f
2 changed files with 54 additions and 9 deletions

View File

@ -1,7 +1,7 @@
From 9b225fac81186176075f673dfe5cf8e373b2068a Mon Sep 17 00:00:00 2001
From: Dan Horak <dan@danny.cz>
Date: Sun, 20 Jul 2008 09:24:05 +0200
Subject: [PATCH 1/8] s390-tools-1.5.3-zipl-zfcpdump-2
Subject: [PATCH 1/9] s390-tools-1.5.3-zipl-zfcpdump-2
---
common.mak | 4 ++--
@ -29,7 +29,7 @@ index 44adc6e..4373da5 100644
From a3d9221076f9eb7cc8434baac71327f786351c63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Thu, 23 Apr 2009 11:46:01 +0200
Subject: [PATCH 2/8] s390-tools-1.8.1-fdasd-su
Subject: [PATCH 2/9] s390-tools-1.8.1-fdasd-su
---
fdasd/fdasd.c | 10 ++++++----
@ -63,7 +63,7 @@ index ba22475..f2ac417 100644
From d13c754f68ea838a47b8125006b9b493cfbbb7f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 21 Aug 2013 12:13:30 +0200
Subject: [PATCH 3/8] dbginfo.sh: Avoiding exclusion list for pipes in sysfs
Subject: [PATCH 3/9] dbginfo.sh: Avoiding exclusion list for pipes in sysfs
Description: dbginfo.sh: Avoiding exclusion list for pipes in sysfs
Symptom: The dbginfo.sh script hangs
@ -133,7 +133,7 @@ index 6d07132..0ada40b 100755
From 7d540e7f40c731092ac655d1d38af7d69ceee706 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 21 Aug 2013 12:13:58 +0200
Subject: [PATCH 4/8] zipl: Fix zipl "--force" option for DASD multi-volume
Subject: [PATCH 4/9] zipl: Fix zipl "--force" option for DASD multi-volume
dump
Description: zipl: Fix zipl "--force" option for DASD multi-volume dump
@ -184,7 +184,7 @@ index f1cec78..529d6b3 100644
From 21caf0d0dc05c5e950f369f72027a203a7d3e772 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 5 Nov 2013 12:23:18 +0100
Subject: [PATCH 5/8] zipl: Use "possible_cpus" kernel parameter
Subject: [PATCH 5/9] zipl: Use "possible_cpus" kernel parameter
Description: zipl: Use "possible_cpus" kernel parameter
Symptom: The zfcpdump system might run out-of memory.
@ -224,7 +224,7 @@ index cc2ed16..68dffe1 100644
From d3792e20601152ac2deea8d592b9fc176590ec5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 19 Nov 2013 18:02:03 +0100
Subject: [PATCH 6/8] dbginfo.sh: enhancements for script execution and man
Subject: [PATCH 6/9] dbginfo.sh: enhancements for script execution and man
page
Description: dbginfo.sh: enhancements for script execution and man page
@ -786,7 +786,7 @@ index cdef849..c0975cc 100644
From 31cd858e82efd289c4ea8ea4801346746aefcd2c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Tue, 19 Nov 2013 18:02:35 +0100
Subject: [PATCH 7/8] dbginfo.sh: avoid double data collection
Subject: [PATCH 7/9] dbginfo.sh: avoid double data collection
Description: dbginfo.sh: avoid double data collection
Symptom: Execution of dbginfo.sh fails with 'no space left on device'
@ -834,7 +834,7 @@ index 9b64076..e83774b 100755
From 4009f4a16c96f7fee65d77de112ef61109fdc0bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 15 Jan 2014 15:08:29 +0100
Subject: [PATCH 8/8] zipl: fix segmentation fault in automenu array
Subject: [PATCH 8/9] zipl: fix segmentation fault in automenu array
Description: zipl: fix segmentation fault in automenu array
Symptom: Building an automenu with a large number of entries may
@ -873,3 +873,45 @@ index 597b01c..c357418 100644
--
1.8.1.4
From 5eca8bced9faf6a15bdb7a0c43b53b6817a53473 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 29 Jan 2014 10:37:03 +0100
Subject: [PATCH 9/9] zipl: Fix zfcpdump "struct job_ipl_data" initialization
Description: zipl: Fix zfcpdump "struct job_ipl_data" initialization
Symptom: When zfcpdump starts, dump fails and the following error
message is written:
ERROR: open() source device '/sys/kernel/debug/zcore/mem' failed!
Problem: Because the "struct job_ipl_data" stack variable is not
initialized in add_dump_program() the "is_kdump" member can
be non-zero in case of zfcpdump. This makes the zfcpdump
code think that stand-alone kdump is triggered instead of
zfcpdump and then "zcore/mem" is not created by the kernel.
Solution: Initialize "struct job_ipl_data" with zeroes.
Reproduction: 1) Prepare SCSI disk with zipl:
# mount /dev/sda1 /mnt
# zipl -D /dev/sda1 -t /mnt
2) Trigger SCSI dump
Note: Because the problem occurs only if the stack variable is
not zero the problem will not occur every time.
---
zipl/src/bootmap.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/zipl/src/bootmap.c b/zipl/src/bootmap.c
index 68dffe1..d573eda 100644
--- a/zipl/src/bootmap.c
+++ b/zipl/src/bootmap.c
@@ -661,6 +661,7 @@ add_dump_fs_program(int fd, struct job_dump_fs_data* dump_fs,
int rc;
/* Convert fs dump job to IPL job */
+ memset(&ipl, 0, sizeof(ipl));
ipl.image = dump_fs->image;
ipl.image_addr = dump_fs->image_addr;
ipl.ramdisk = dump_fs->ramdisk;
--
1.8.1.4

View File

@ -5,7 +5,7 @@ Name: s390utils
Summary: Utilities and daemons for IBM System/z
Group: System Environment/Base
Version: 1.23.0
Release: 6%{?dist}
Release: 7%{?dist}
Epoch: 2
License: GPLv2 and GPLv2+ and CPL
ExclusiveArch: s390 s390x
@ -734,6 +734,9 @@ User-space development files for the s390/s390x architecture.
%changelog
* Wed Jan 29 2014 Dan Horák <dan[at]danny.cz> - 2:1.23.0-7
- zipl: Fix zfcpdump "struct job_ipl_data" initialization (#1058856)
* Wed Jan 15 2014 Dan Horák <dan[at]danny.cz> - 2:1.23.0-6
- zipl: fix segmentation fault in automenu array (#1017541)
- zfcpconf.sh: check current online state before setting zfcp device online (#1042496)