Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1421003
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Shuah Khan <shuahkh@osg.samsung.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove() |
| Date | Mon, 13 Jun 2016 17:40:01 +0200 |
| Message-ID | <rJC81-8aA-5@gated-at.bofh.it> (permalink) |
| References | <rHX6V-7Ur-3@gated-at.bofh.it> <rJApA-6Xi-23@gated-at.bofh.it> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 42 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Kyungmin Park <kyungmin.park@samsung.com>, Kamil Debski <k.debski@samsung.com>, jtp.park@samsung.com, Mauro Carvalho Chehab <mchehab@osg.samsung.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Linux Media Mailing List <linux-media@vger.kernel.org>, Linux Kernel <linux-kernel@vger.kernel.org>, Shuah Khan <shuahkh@osg.samsung.com> |
| X-Original-Date | Mon, 13 Jun 2016 09:38:38 -0600 |
| X-Original-Message-ID | <575ED37E.4010204@osg.samsung.com> |
| X-Original-References | <1465436115-13880-1-git-send-email-shuahkh@osg.samsung.com> <CABxcv=nT_zp2BkvSV04sqaXmZGnQz=z-cGURDJwUW7hthD6-Fw@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1421003 |
Show key headers only | View raw
On 06/13/2016 07:42 AM, Javier Martinez Canillas wrote: > Hello Shuah, > > On Wed, Jun 8, 2016 at 9:35 PM, Shuah Khan <shuahkh@osg.samsung.com> wrote: >> s5p_mfc_remove() fails to release encoder and decoder video devices. >> >> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> >> --- >> drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c >> index 274b4f1..af61f54 100644 >> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c >> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c >> @@ -1317,7 +1317,9 @@ static int s5p_mfc_remove(struct platform_device *pdev) >> destroy_workqueue(dev->watchdog_workqueue); >> >> video_unregister_device(dev->vfd_enc); >> + video_device_release(dev->vfd_enc); >> video_unregister_device(dev->vfd_dec); >> + video_device_release(dev->vfd_dec); >> v4l2_device_unregister(&dev->v4l2_dev); >> s5p_mfc_release_firmware(dev); >> vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]); >> -- > > Can you please do the remove operations in the inverse order of their > counterparts? IOW to do the release for both encoder and decoder after > their unregistration. > I considered that. No problem. I will move both release after the video_unregister_device(dev->vfd_dec), releasing enc first and then the dec > > Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> > thanks, -- Shuah
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove() Javier Martinez Canillas <javier@dowhile0.org> - 2016-06-13 15:50 +0200 Re: [PATCH] media: s5p-mfc fix memory leak in s5p_mfc_remove() Shuah Khan <shuahkh@osg.samsung.com> - 2016-06-13 17:40 +0200
csiph-web