Home Home > GIT Browse
diff options
authorMichal Suchanek <msuchanek@suse.de>2019-05-02 14:11:39 +0200
committerMichal Suchanek <msuchanek@suse.de>2019-05-02 14:11:39 +0200
commite24913c87b3086af21cb95df6065ed30f78fc553 (patch)
parentd40d16099d9ba0757843f07a91af24797ba85cce (diff)
s390/dasd: fix panic for failed online processing (bsc#1132589).
2 files changed, 64 insertions, 0 deletions
diff --git a/patches.drivers/s390-dasd-fix-panic-for-failed-online-processing.patch b/patches.drivers/s390-dasd-fix-panic-for-failed-online-processing.patch
new file mode 100644
index 0000000000..63c1a7cc1e
--- /dev/null
+++ b/patches.drivers/s390-dasd-fix-panic-for-failed-online-processing.patch
@@ -0,0 +1,63 @@
+From 7c6553d4db03350dad0110c3224194c19df76a8f Mon Sep 17 00:00:00 2001
+From: Stefan Haberland <sth@linux.ibm.com>
+Date: Wed, 25 Jul 2018 13:27:10 +0200
+Subject: [PATCH] s390/dasd: fix panic for failed online processing
+References: bsc#1132589
+Patch-mainline: v4.19-rc1
+Git-commit: 7c6553d4db03350dad0110c3224194c19df76a8f
+Description: dasd: panic during online processing
+Symptom: Kernel may panic if online proccessing fails.
+Problem: While reading configuration data an I/O error may occur which
+ causes the online processing to roll back all previous steps.
+ A valid pointer for the private data structure of a device is
+ expected when disconnecting the device from an lcu. However,
+ if the I/O error occurs very early, the private data structure
+ hasn't been set up yet. An invalid pointer is the result and
+ causes the kernel to panic.
+Solution: Check for a valid private data pointer before disconnecting a
+ device from the lcu.
+Reproduction: While turning all CHPIDs for a DASD off/on with chchp -v 0/1
+ and then setting the same DASD online (chccwdev -e <device>) can
+ reproduce the issue. The pathgroup may get lost and the online
+ processing will fail early, causing the access of an invalid
+ pointer.
+Fix a panic that occurs for a device that got an error in
+dasd_eckd_check_characteristics() during online processing.
+For example the read configuration data command may have failed.
+If this error occurs the device is not being set online and the earlier
+invoked steps during online processing are rolled back. Therefore
+dasd_eckd_uncheck_device() is called which needs a valid private
+structure. But this pointer is not valid if
+dasd_eckd_check_characteristics() has failed.
+Check for a valid device->private pointer to prevent a panic.
+Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
+Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+ drivers/s390/block/dasd_eckd.c | 3 +++
+ 1 file changed, 3 insertions(+)
+diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
+index c5a55513b07c..1e97378d4f60 100644
+--- a/drivers/s390/block/dasd_eckd.c
++++ b/drivers/s390/block/dasd_eckd.c
+@@ -1780,6 +1780,9 @@ static void dasd_eckd_uncheck_device(struct dasd_device *device)
+ struct dasd_eckd_private *private = device->private;
+ int i;
++ if (!private)
++ return;
+ dasd_alias_disconnect_device_from_lcu(device);
+ private->ned = NULL;
+ private->sneq = NULL;
diff --git a/series.conf b/series.conf
index f05f8bac33..c0cc07ac94 100644
--- a/series.conf
+++ b/series.conf
@@ -17923,6 +17923,7 @@
+ patches.drivers/s390-dasd-fix-panic-for-failed-online-processing.patch