Skip to content

Commit dd9cb84

Browse files
vneethvVasily Gorbik
authored andcommitted
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: 32ef938 ("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>
1 parent e286f23 commit dd9cb84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/s390/cio/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ static int io_subchannel_chp_event(struct subchannel *sch,
11801180
else
11811181
path_event[chpid] = PE_NONE;
11821182
}
1183-
if (cdev)
1183+
if (cdev && cdev->drv && cdev->drv->path_event)
11841184
cdev->drv->path_event(cdev, path_event);
11851185
break;
11861186
}

0 commit comments

Comments
 (0)