Re: Allocating videobuf_buffer, but lists not being initialized

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

 



ä 11/16/2010 03:40 PM, Hans Verkuil åé:
On Tuesday, November 16, 2010 06:29:53 Pawel Osciak wrote:
On Mon, Nov 15, 2010 at 17:10, Andrew Chew<AChew@xxxxxxxxxx>  wrote:
I'm looking at drivers/media/video/videobuf-dma-contig.c's __videobuf_alloc() routine.  We call kzalloc() to allocate the videobuf_buffer.  However, I don't see where the two lists (vb->stream and vb->queue) that are a part of struct videobuf_buffer get initialized (with, say, INIT_LIST_HEAD).


Those are not lists, but list entries. Those members of
videobuf_buffer struct are used to put the buffer on one of the
following lists: stream is a list entry for stream list in
videobuf_queue, queue is used as list entry for driver's buffer queue.

So? They still should be initialized properly. It's bad form to leave
invalid pointers there.

it just a list->entry, it has initialized by kzalloc at __videobuf_alloc_vb(),


Regards,

	Hans


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