diff options
author | Stefan Haberland <sth@linux.vnet.ibm.com> | 2017-10-08 01:36:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-08 12:08:37 +0300 |
commit | ba56e6cd9741c8f7454e7712ec5f81c988e5cb9e (patch) | |
tree | 7bb0e991064ea989806276487f66ee424805effa | |
parent | 0b5cdee7df7645b842ef10bebe35b16bd69ab953 (diff) | |
download | linux-ba56e6cd9741c8f7454e7712ec5f81c988e5cb9e.tar.xz |
s390/dasd: check for device error pointer within state change interrupts
[ Upstream commit 2202134e48a3b50320aeb9e3dd1186833e9d7e66 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/s390/block/dasd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 1de089019268..5ecd40884f01 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -1704,8 +1704,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) |