From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: greybus-dev@lists.linaro.org,
Mikhail Lobanov <m.lobanov@rosalinux.ru>,
linux-staging@lists.linux.dev, Alex Elder <elder@ieee.org>
Subject: Re: [PATCH v2] greybus: lights: check return of get_channel_from_mode
Date: Tue, 26 Mar 2024 09:27:20 +0100 [thread overview]
Message-ID: <2024032611-gallery-semicolon-2951@gregkh> (raw)
In-Reply-To: <20240325221549.2185265-1-rmfrfs@gmail.com>
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@rosalinux.ru
>
> Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
> Reported-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
> Suggested-by: Mikhail Lobanov <m.lobanov@rosalinux.ru>
> Suggested-by: Alex Elder <elder@ieee.org>
> Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
> ---
> 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
prev parent reply other threads:[~2024-03-26 8:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 22:09 [PATCH v2] greybus: lights: check return of get_channel_from_mode Rui Miguel Silva
2024-03-26 8:27 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024032611-gallery-semicolon-2951@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=elder@ieee.org \
--cc=greybus-dev@lists.linaro.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.lobanov@rosalinux.ru \
--cc=rmfrfs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).