ACK: [SRU][I][J][PATCH 1/1] s390/cio: verify the driver availability for path_event call
Stefan Bader
stefan.bader at canonical.com
Wed Feb 16 10:35:07 UTC 2022
On 16.02.22 10:58, Krzysztof Kozlowski wrote:
> From: Vineeth Vijayan <vneethv at linux.ibm.com>
>
> BugLink: https://bugs.launchpad.net/bugs/1960875
>
> 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 at vger.kernel.org
> Signed-off-by: Vineeth Vijayan <vneethv at linux.ibm.com>
> Suggested-by: Peter Oberparleiter <oberpar at linux.ibm.com>
> Reviewed-by: Jan Hoeppner <hoeppner at linux.ibm.com>
> Reviewed-by: Peter Oberparleiter <oberpar at linux.ibm.com>
> Signed-off-by: Vasily Gorbik <gor at linux.ibm.com>
> (cherry picked from commit dd9cb842fa9d90653a9b48aba52f89c069f3bc50)
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
> drivers/s390/cio/device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
> index 84f659cafe76..ab734b66d008 100644
> --- a/drivers/s390/cio/device.c
> +++ b/drivers/s390/cio/device.c
> @@ -1208,7 +1208,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;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220216/8b600b12/attachment-0001.sig>
More information about the kernel-team
mailing list