mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 21:33:00 +00:00
s390/cio: verify the driver availability for path_event call
If no driver is attached to a device or the driver does not provide the
path_event function, an FCES path-event on this device could end up in a
kernel-panic. Verify the driver availability before the path_event
function call.
Fixes: 32ef938815
("s390/cio: Add support for FCES status notification")
Cc: stable@vger.kernel.org
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Suggested-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Reviewed-by: Jan Hoeppner <hoeppner@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
e286f231ea
commit
dd9cb842fa
@ -1180,7 +1180,7 @@ static int io_subchannel_chp_event(struct subchannel *sch,
|
||||
else
|
||||
path_event[chpid] = PE_NONE;
|
||||
}
|
||||
if (cdev)
|
||||
if (cdev && cdev->drv && cdev->drv->path_event)
|
||||
cdev->drv->path_event(cdev, path_event);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user