public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Reqbufs(0) need to release queued_list
@ 2011-10-24  3:25 Angela Wan
  2011-10-24 19:39 ` Guennadi Liakhovetski
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Angela Wan @ 2011-10-24  3:25 UTC (permalink / raw)
  To: pawel, m.szyprowski; +Cc: linux-media, leiwen, ytang5, qingx, jwan

Hi,
   As I have used videobuf2+soc_camera architecture on my camera
driver. I find a problem when I use Reqbuf(0), which only release
buffer, but not clear queued_list.
   Problem description:
   That is if upper layer uses qbuf then reqbuf0 directly, not having
stream on/dqbuf/off, then next time when streamon, videobuf2 could
still have the buffer from queued_list which having the buffer
released in privious reqbuf0, and the camera driver could access the
buffer already freed.
The steps that could cause problem for USERPTR:
Qbuf
Qbuf
Reqbuf 0
Reqbuf 20
Qbuf
Qbuf
Streamon   (queued_list still has the buffer already freed in the
previous reqbuf0)
.buf_queue (from camera driver, could access the buffer already freed)

   My question is if we could use __vb2_queue_release which calls
__vb2_queue_cancle(clear queue_list) and __vb2_queue_free(release
buffer) in Reqbuf(0), while not only use __vb2_queue_free.

Thank you

Angela Wan
Best Regards

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

end of thread, other threads:[~2011-11-07 14:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24  3:25 Reqbufs(0) need to release queued_list Angela Wan
2011-10-24 19:39 ` Guennadi Liakhovetski
2011-10-24 20:55 ` Marek Szyprowski
2011-10-25  7:59 ` [PATCH] media: vb2: reset queued list on REQBUFS(0) call Marek Szyprowski
2011-10-25  8:07   ` Angela Wan
2011-10-25  8:14     ` Pawel Osciak
2011-10-25  8:11   ` Pawel Osciak
2011-11-07 13:46     ` Mauro Carvalho Chehab
2011-11-07 14:14       ` Marek Szyprowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox