From: Laurent Pinchart Date: Sat, 13 Aug 2011 16:13:32 +0000 (-0300) Subject: [media] omap3isp: video: Avoid crashes when pipeline set stream operation fails X-Git-Tag: v3.2-rc1~112^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b6c3ef0e43fe80b517735697e4d0fb5729b2ab4;p=pandora-kernel.git [media] omap3isp: video: Avoid crashes when pipeline set stream operation fails If streaming can't be enabled on the pipeline, the DMA buffers queue is not emptied. If the buffers then get freed the queue will end up referencing free memory. This is usually not an issue, as the DMA queue will be reinitialized the next time streaming is enabled, before enabling the hardware. However, if the sensor connected at the pipeline input is free-running, the CCDC will start generating interrupts as soon as it gets powered up, before the streaming gets enabled on the hardware. This will make the CCDC interrupt handler access freed memory, causing a crash. Reinitialize the DMA buffers queue in isp_video_streamon() if the error path to make sure this situation won't happen. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed