Re: [PATCH v2] greybus: lights: check return of get_channel_from_mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 25, 2024 at 10:09:55PM +0000, Rui Miguel Silva wrote:
> If channel for the given node is not found we return null from
> get_channel_from_mode. Make sure we validate the return pointer
> before using it in two of the missing places.
> 
> This was originally reported in [0]:
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> [0] https://lore.kernel.org/all/20240301190425.120605-1-m.lobanov@xxxxxxxxxxxx
> 
> Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
> Reported-by: Mikhail Lobanov <m.lobanov@xxxxxxxxxxxx>
> Suggested-by: Mikhail Lobanov <m.lobanov@xxxxxxxxxxxx>
> Suggested-by: Alex Elder <elder@xxxxxxxx>
> Signed-off-by: Rui Miguel Silva <rmfrfs@xxxxxxxxx>
> ---
> v1[1] -> v2:
> GregKh:
>     - remove overkill WARN_ON and replace it for a dev_err

Thanks for the quick change, now queued up.

greg k-h
_______________________________________________
greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx



[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux