Selaa lähdekoodia

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>
Magnus Damm 16 vuotta sitten
vanhempi
commit
97215cbd1b
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      drivers/media/video/sh_mobile_ceu_camera.c

+ 1 - 0
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;