linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fixed list_del corruption in videobuf-core.c : videobuf_queue_cancel()
@ 2012-10-05 15:44 Andrei Mandychev
  2012-10-08 14:50 ` Hiremath, Vaibhav
  0 siblings, 1 reply; 5+ messages in thread
From: Andrei Mandychev @ 2012-10-05 15:44 UTC (permalink / raw)
  To: hvaibhav
  Cc: archit, tomi.valkeinen, sumit.semwal, linux-media,
	Andrei Mandychev

If there is a buffer with VIDEOBUF_QUEUED state it won't be deleted properly
because the head of queue loses its elements by calling INIT_LIST_HEAD()
before videobuf_streamoff().
---
 drivers/media/video/omap/omap_vout.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 409da0f..f02eb8e 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -1738,8 +1738,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
 		v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode in"
 				" streamoff\n");
 
-	INIT_LIST_HEAD(&vout->dma_queue);
 	ret = videobuf_streamoff(&vout->vbq);
+	INIT_LIST_HEAD(&vout->dma_queue);
 
 	return ret;
 }
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-25 13:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 15:44 [PATCH] Fixed list_del corruption in videobuf-core.c : videobuf_queue_cancel() Andrei Mandychev
2012-10-08 14:50 ` Hiremath, Vaibhav
2012-10-08 15:39   ` Andrei Mandychev
     [not found]   ` <CAH9bG+Cp8gURyZ=cc3doCd_TR2CzLMrcKSGMKpe55jmCNYr+KQ@mail.gmail.com>
2012-10-09 17:32     ` Hiremath, Vaibhav
2012-10-25 13:34       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).