Re: Reqbufs(0) need to release queued_list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Oct 2011, Angela Wan wrote:

> 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.

Indeed, looks like vb2_reqbufs(p->count == 0) fails to clean up the queue?

Thanks
Guennadi

>    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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux