summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-03-13 06:08:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:21 -0300
commit97215cbd1bc3cc32a2a1b3a94b003c3cbcf95683 (patch)
treee83cfc0900ea5e1e6d2e88643ac8f754dc2638f8
parentf340e3f6f1c2061a65fd1cbd70e9e57e27d34212 (diff)
downloadlinux-3.10-97215cbd1bc3cc32a2a1b3a94b003c3cbcf95683.tar.gz
linux-3.10-97215cbd1bc3cc32a2a1b3a94b003c3cbcf95683.tar.bz2
linux-3.10-97215cbd1bc3cc32a2a1b3a94b003c3cbcf95683.zip
V4L/DVB (11029): video: use videobuf_waiton() in sh_mobile_ceu free_buffer()
Make sure videobuf_waiton() is used before freeing a buffer. Without this fix we may return the buffer to the allocator before the bus mastering operation is finished. Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/sh_mobile_ceu_camera.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/sh_mobile_ceu_camera.c b/drivers/media/video/sh_mobile_ceu_camera.c
index 55a5eae77ba..b5e37a530c6 100644
--- a/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/drivers/media/video/sh_mobile_ceu_camera.c
@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq,
if (in_interrupt())
BUG();
+ videobuf_waiton(&buf->vb, 0, 0);
videobuf_dma_contig_free(vq, &buf->vb);
dev_dbg(&icd->dev, "%s freed\n", __func__);
buf->vb.state = VIDEOBUF_NEEDS_INIT;