]> git.itanic.dy.fi Git - linux-stable/commit
s390/dasd: fix panic for failed online processing
authorStefan Haberland <sth@linux.ibm.com>
Wed, 25 Jul 2018 11:27:10 +0000 (13:27 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 9 Aug 2018 10:49:30 +0000 (12:49 +0200)
commit7c6553d4db03350dad0110c3224194c19df76a8f
tree7757bd5d50b680148be4188beb6f96fe646f81ac
parent37a366face294facb9c9d9fdd9f5b64a27456cbd
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>
drivers/s390/block/dasd_eckd.c