kernel-ark/drivers/media
Ian Armstrong b6e436b263 V4L/DVB: ivtv: Fix race condition for queued udma transfers
There are several DMA related interrupts which wake up the dma_waitq. The udma
routines use this queue while they wait for their transfer to complete. When
woken, the udma routine will check the IVTV_F_I_UDMA_PENDING & IVTV_F_I_UDMA
flags to see if the transfer is still queued or has finished. However, a small
window exists between the IVTV_F_I_UDMA_PENDING flag being cleared and the
IVTV_F_I_UDMA flag being set. Given that the completion of an unrelated DMA
transfer may wake up the udma routine, it's possible for this check to fail
and the udma routine will start unmapping pages when the transfer has only
just started. The result of this is unpredictable.

This fix simply delays the clearing of the IVTV_F_I_UDMA_PENDING flag until
after IVTV_F_I_UDMA has been set.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:41 -03:00
..
common saa7146: stop DMA before de-allocating DMA scatter/gather page buffers 2010-02-01 22:02:03 -02:00
dvb V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod 2010-02-26 15:10:41 -03:00
IR V4L/DVB: ir: fix memory leak 2010-02-26 15:10:35 -03:00
radio V4L/DVB (13948): radio: Correct use after free 2010-02-26 15:10:33 -03:00
video V4L/DVB: ivtv: Fix race condition for queued udma transfers 2010-02-26 15:10:41 -03:00
Kconfig V4L/DVB (13612): IR: Move common IR code to drivers/media/IR 2009-12-16 00:18:42 -02:00
Makefile V4L/DVB (13612): IR: Move common IR code to drivers/media/IR 2009-12-16 00:18:42 -02:00