diff options
author | Vineeth Vijayan <vneethv@linux.ibm.com> | 2022-02-02 21:45:56 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-02-09 22:55:01 +0100 |
commit | dd9cb842fa9d90653a9b48aba52f89c069f3bc50 (patch) | |
tree | 84919f73f28005929259e1dce46818c64d3ae55b | |
parent | s390/module: fix building test_modules_helpers.o with clang (diff) | |
download | linux-dd9cb842fa9d90653a9b48aba52f89c069f3bc50.tar.xz linux-dd9cb842fa9d90653a9b48aba52f89c069f3bc50.zip |
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: 32ef938815c1 ("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>
-rw-r--r-- | drivers/s390/cio/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index cd938a26b76c..3b1cd0c96a74 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -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; } |