summaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Haberland <sth@linux.vnet.ibm.com>2017-01-25 14:47:32 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-01-31 10:47:15 +0100
commit2202134e48a3b50320aeb9e3dd1186833e9d7e66 (patch)
treed6e73bfe17509597353206f761d22f0b4b78ae17 /drivers/s390/block
parents390/dasd: allow 0 for path_threshold attribute (diff)
downloadlinux-2202134e48a3b50320aeb9e3dd1186833e9d7e66.tar.xz
linux-2202134e48a3b50320aeb9e3dd1186833e9d7e66.zip
s390/dasd: check for device error pointer within state change interrupts
Check if the device pointer is valid. Just a sanity check since we already are in the int handler of the device. Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block')
-rw-r--r--drivers/s390/block/dasd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 0e3fdfdbd098..f3099c8cc143 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1712,8 +1712,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
/* check for for attention message */
if (scsw_dstat(&irb->scsw) & DEV_STAT_ATTENTION) {
device = dasd_device_from_cdev_locked(cdev);
- device->discipline->check_attention(device, irb->esw.esw1.lpum);
- dasd_put_device(device);
+ if (!IS_ERR(device)) {
+ device->discipline->check_attention(device,
+ irb->esw.esw1.lpum);
+ dasd_put_device(device);
+ }
}
if (!cqr)