aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Haberland <sth@linux.ibm.com>2018-07-25 13:27:10 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-08-09 12:49:30 +0200
commit7c6553d4db03350dad0110c3224194c19df76a8f (patch)
tree7757bd5d50b680148be4188beb6f96fe646f81ac /drivers/s390
parents390/mm: fix addressing exception after suspend/resume (diff)
downloadlinux-dev-7c6553d4db03350dad0110c3224194c19df76a8f.tar.xz
linux-dev-7c6553d4db03350dad0110c3224194c19df76a8f.zip
s390/dasd: fix panic for failed online processing
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_eckd.c3
1 files changed, 3 insertions, 0 deletions
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;