Skip to content

Commit 4b7a358

Browse files
stefan-haberlandgregkh
authored andcommitted
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>
1 parent 45a012a commit 4b7a358

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/s390/block/dasd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1635,8 +1635,11 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
16351635
/* check for for attention message */
16361636
if (scsw_dstat(&irb->scsw) & DEV_STAT_ATTENTION) {
16371637
device = dasd_device_from_cdev_locked(cdev);
1638-
device->discipline->check_attention(device, irb->esw.esw1.lpum);
1639-
dasd_put_device(device);
1638+
if (!IS_ERR(device)) {
1639+
device->discipline->check_attention(device,
1640+
irb->esw.esw1.lpum);
1641+
dasd_put_device(device);
1642+
}
16401643
}
16411644

16421645
if (!cqr)

0 commit comments

Comments
 (0)