From: Magnus Damm <magnus.damm@gmail.com>
To: video4linux-list@redhat.com
Cc: g.liakhovetski@gmx.de, mchehab@infradead.org
Subject: [PATCH] videobuf-dma-contig: fix USERPTR free handling
Date: Wed, 10 Dec 2008 13:54:32 +0900 [thread overview]
Message-ID: <20081210045432.3810.42700.sendpatchset@rx1.opensource.se> (raw)
From: Magnus Damm <damm@igel.co.jp>
This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
video buffers.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/videobuf-dma-contig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/drivers/media/video/videobuf-dma-contig.c
+++ work/drivers/media/video/videobuf-dma-contig.c 2008-12-07 22:34:47.000000000 +0900
@@ -400,7 +400,7 @@ void videobuf_dma_contig_free(struct vid
So, it should free memory only if the memory were allocated for
read() operation.
*/
- if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
+ if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
return;
if (!mem)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next reply other threads:[~2008-12-10 4:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-10 4:54 Magnus Damm [this message]
2009-01-11 18:26 ` [PATCH] videobuf-dma-contig: fix USERPTR free handling Guennadi Liakhovetski
2009-01-16 4:57 ` Magnus Damm
2009-01-24 0:54 ` Mauro Carvalho Chehab
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=20081210045432.3810.42700.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=mchehab@infradead.org \
--cc=video4linux-list@redhat.com \
/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