From: Johann Friedrichs <johann.friedrichs@web.de>
To: linux-media@vger.kernel.org
Subject: [PATCH] saa7146 memory leakage in pagetable-handling
Date: Mon, 28 Sep 2009 12:49:06 +0200 [thread overview]
Message-ID: <4AC094A2.4070806@web.de> (raw)
It is necessary to release the allocated pgtables in buffer_release. It
is now done only in buffer_prepare. This will not work if a new
videobuf_buffer has been requested since the last call, as the former
pointers are lost.
Signed-off-by: johann.friedrichs@web.de
--- a/drivers/media/common/saa7146_video.c 2009-04-17
21:42:35.000000000 +0200
+++ b/drivers/media/common/saa7146_video.c 2009-09-22
09:03:50.000000000 +0200
@@ -1331,6 +1331,9 @@ static void buffer_release(struct videob
DEB_CAP(("vbuf:%p\n",vb));
saa7146_dma_free(dev,q,buf);
+ saa7146_pgtable_free(dev->pci, &buf->pt[0]);
+ saa7146_pgtable_free(dev->pci, &buf->pt[1]);
+ saa7146_pgtable_free(dev->pci, &buf->pt[2]);
}
static struct videobuf_queue_ops video_qops = {
reply other threads:[~2009-09-28 10:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4AC094A2.4070806@web.de \
--to=johann.friedrichs@web.de \
--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;
as well as URLs for NNTP newsgroup(s).