Commit 97215cbd authored by Magnus Damm's avatar Magnus Damm Committed by Mauro Carvalho Chehab
Browse files

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: default avatarMatthieu CASTET <>
Tested-by: default avatarKuninori Morimoto <>
Signed-off-by: default avatarMagnus Damm <>
Signed-off-by: default avatarGuennadi Liakhovetski <>
Signed-off-by: default avatarMauro Carvalho Chehab <>
parent f340e3f6
...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq, ...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq,
if (in_interrupt()) if (in_interrupt())
BUG(); BUG();
videobuf_waiton(&buf->vb, 0, 0);
videobuf_dma_contig_free(vq, &buf->vb); videobuf_dma_contig_free(vq, &buf->vb);
dev_dbg(&icd->dev, "%s freed\n", __func__); dev_dbg(&icd->dev, "%s freed\n", __func__);
buf->vb.state = VIDEOBUF_NEEDS_INIT; buf->vb.state = VIDEOBUF_NEEDS_INIT;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment