Linux Media Controller development
 help / color / mirror / Atom feed
From: Mark Balantzyan <mbalant3@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mark Balantzyan <mbalant3@gmail.com>,
	ezequiel@vanguardiasur.com.ar, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media input infrastructure:tw686x: Fix of possibleinconsistent memory deallocation and/or race condition by implementation of custom video_device_release function in tw686x driver
Date: Wed, 31 Jul 2019 14:32:46 -0700 (PDT)	[thread overview]
Message-ID: <alpine.OSX.2.21.1907311431410.3567@exun.local> (raw)
In-Reply-To: <40d14e23-636e-ed8a-6608-99427f5b8169@xs4all.nl>

Hi Hans, all,

Sorry for the poor patching, I am a student and as you may tell still new 
to this system. At the time of the patching, I wasn't fully informed of 
all the requirements that go into such things, and am still learning.

Would it be alright if I submit a report instead? In order to, I am 
(still, sorry) trying to understand the issue at hand. How in fact may the 
release() callback be overridden (by a tw686x-specific function) to free 
the dma memory and call video_device_release()? To my understanding at the 
time, this was merely a re-implementation of video_device_release with 
said requirements and subtraction of extra features from 
tw686x_video_free()..

 	This release() callback is called by the V4L2 framework when the last user
 	of the device closes its filehandle, so that's a good point to free all
 	the memory. Doing it earlier (as the current code does) runs the risk that someone might
 	still access that memory, and you don't want that.

Yes, I definitely don't want that. :)

Thank you,
Mark


  reply	other threads:[~2019-07-31 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29 20:09 [PATCH] media input infrastructure:tw686x: Fix of possibleinconsistent memory deallocation and/or race condition by implementation of custom video_device_release function in tw686x driver Mark Balantzyan
2019-07-30  8:15 ` Hans Verkuil
2019-07-31 21:32   ` Mark Balantzyan [this message]
2019-08-03 12:24     ` [PATCH] media input infrastructure:tw686x 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=alpine.OSX.2.21.1907311431410.3567@exun.local \
    --to=mbalant3@gmail.com \
    --cc=ezequiel@vanguardiasur.com.ar \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.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