From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] v4l: rcar-vin: Implement V4L2 video node release handler
Date: Thu, 16 Nov 2017 02:27:53 +0200 [thread overview]
Message-ID: <2234965.HDk880jUUl@avalon> (raw)
In-Reply-To: <20171115233433.GL12677@bigcity.dyn.berto.se>
Hi Niklas,
On Thursday, 16 November 2017 01:34:33 EET Niklas Söderlund wrote:
> On 2017-11-16 00:49:07 +0200, Laurent Pinchart wrote:
> > The rvin_dev data structure contains driver private data for an instance
> > of the VIN. It is allocated dynamically at probe time, and must be freed
> > once all users are gone.
> >
> > The structure is currently allocated with devm_kzalloc(), which results
> > in memory being freed when the device is unbound. If a userspace
> > application is currently performing an ioctl call, or just keeps the
> > device node open and closes it later, this will lead to accessing freed
> > memory.
> >
> > Fix the problem by implementing a V4L2 release handler for the video
> > node associated with the VIN instance (called when the last user of the
> > video node releases it), and freeing memory explicitly from the release
> > handler.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
>
> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
>
> This patch is based on-top of the VIN Gen3 enablement series not yet
> upstream. This is OK for me, just wanted to check that this was the
> intention as to minimize conflicts between the two.
Yes, that's my intention. The patch should be included, or possibly squashed
in, your development branch.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-11-16 0:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-15 22:49 [PATCH] v4l: rcar-vin: Implement V4L2 video node release handler Laurent Pinchart
2017-11-15 23:34 ` Niklas Söderlund
2017-11-16 0:27 ` Laurent Pinchart [this message]
2017-12-04 9:05 ` Hans Verkuil
2017-12-04 13:34 ` Niklas Söderlund
2017-12-04 13:41 ` Hans Verkuil
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=2234965.HDk880jUUl@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
/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