From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org,
Johan Hovold <johan@kernel.org>,
greybus-dev@lists.linaro.org, jacek.anaszewski@gmail.com,
viresh.kumar@linaro.org, linux-leds@vger.kernel.org,
laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH v3 1/3] staging: greybus: light: fix memory leak in v4l2 register
Date: Thu, 17 Aug 2017 11:14:57 -0700 [thread overview]
Message-ID: <20170817181457.GA8740@kroah.com> (raw)
In-Reply-To: <20170810154947.2283-2-sakari.ailus@linux.intel.com>
On Thu, Aug 10, 2017 at 06:49:45PM +0300, Sakari Ailus wrote:
> From: Rui Miguel Silva <rmfrfs@gmail.com>
>
> We are allocating memory for the v4l2 flash configuration structure and
> leak it in the normal path. Just use the stack for this as we do not
> use it outside of this function.
>
> Also use IS_ERR() instead of IS_ERR_OR_NULL() to check return value from
> v4l2_flash_init() for it never returns NULL.
>
> Fixes: 2870b52bae4c ("greybus: lights: add lights implementation")
> Reported-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> drivers/staging/greybus/light.c | 29 +++++++++--------------------
> 1 file changed, 9 insertions(+), 20 deletions(-)
Does not apply to my tree :(
next prev parent reply other threads:[~2017-08-17 18:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 15:49 [PATCH v3 0/3] Create sub-device per LED Sakari Ailus
2017-08-10 15:49 ` [PATCH v3 1/3] staging: greybus: light: fix memory leak in v4l2 register Sakari Ailus
2017-08-17 18:14 ` Greg Kroah-Hartman [this message]
2017-08-10 15:49 ` [PATCH v3 2/3] v4l2-flash-led-class: Create separate sub-devices for indicators Sakari Ailus
2017-08-15 10:41 ` [PATCH v3.1 " Sakari Ailus
2017-08-15 11:28 ` [PATCH v3.2 " Sakari Ailus
2017-08-17 18:13 ` Greg Kroah-Hartman
2017-08-10 15:49 ` [PATCH v3 3/3] v4l2-flash-led-class: Document v4l2_flash_init() references Sakari Ailus
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=20170817181457.GA8740@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=greybus-dev@lists.linaro.org \
--cc=jacek.anaszewski@gmail.com \
--cc=johan@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=viresh.kumar@linaro.org \
/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 NNTP newsgroup(s).