Skip to contentSkip to conversation

soc camera driver module may case memory leak

DISCUSSION 再回首 2 participants 2 messages Nov 5, 2012 – Nov 6, 2012 Media (V4L/DVB)

lore
Share & tools
lore

再回首

author
#0 lore raw

Dear sir:
why not call "videobuf_mmap_free",when device close call "soc_camera_close" in linux-2.6.x;do the same in linux-3.x.x?
video capture flow:
1)open
2)set fmt
3)request buffer-->__videobuf_mmap_setup-->videobuf_alloc_vb(q)
4)mmap
5)enqueue, dequeue
6)unmap
7)close--->soc_camera_close-->?should call:videobuf_mmap_free
NOTE:
I have reviewed all the code, found:soc_camera_driver device driver coders has no way(callback function) to call videobuf_mmap_free; it will case memory leak.

#1 lore raw

Hi

Quoted 2 lines · �~F~M�~[~^�~V

Dear sir:
why not call "videobuf_mmap_free",when device close call "soc_camera_close" in linux-2.6.x;

I haven't found any version, where this has been done. I don't think this is needed, because videobuf mmap allocations will be freed automatically upon the last close(). Please, dismiss your bugzilla entry.

Thanks
Guennadi

Quoted 11 lines

do the same in linux-3.x.x?
video capture flow:
1)open
2)set fmt
3)request buffer-->__videobuf_mmap_setup-->videobuf_alloc_vb(q)
4)mmap
5)enqueue, dequeue
6)unmap
7)close--->soc_camera_close-->?should call:videobuf_mmap_free
NOTE:
I have reviewed all the code, found:soc_camera_driver device driver coders has no way(callback function) to call videobuf_mmap_free; it will case memory leak.N�����r��y���b�X��ǧv�^�)޺{.n�+����{���bj)���w*jg��������ݢj/���z�ޖ��2�ޙ���&�)ߡ�a�����G���h��j:+v���w�٥

---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/