* [PATCH] videobuf-dma-contig: fix USERPTR free handling
@ 2008-12-10 4:54 Magnus Damm
2009-01-11 18:26 ` Guennadi Liakhovetski
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2008-12-10 4:54 UTC (permalink / raw)
To: video4linux-list; +Cc: g.liakhovetski, mchehab
From: Magnus Damm <damm@igel.co.jp>
This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
video buffers.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
drivers/media/video/videobuf-dma-contig.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 0001/drivers/media/video/videobuf-dma-contig.c
+++ work/drivers/media/video/videobuf-dma-contig.c 2008-12-07 22:34:47.000000000 +0900
@@ -400,7 +400,7 @@ void videobuf_dma_contig_free(struct vid
So, it should free memory only if the memory were allocated for
read() operation.
*/
- if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
+ if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
return;
if (!mem)
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] videobuf-dma-contig: fix USERPTR free handling
2008-12-10 4:54 [PATCH] videobuf-dma-contig: fix USERPTR free handling Magnus Damm
@ 2009-01-11 18:26 ` Guennadi Liakhovetski
2009-01-16 4:57 ` Magnus Damm
0 siblings, 1 reply; 4+ messages in thread
From: Guennadi Liakhovetski @ 2009-01-11 18:26 UTC (permalink / raw)
To: Magnus Damm; +Cc: video4linux-list, Mauro Carvalho Chehab
On Wed, 10 Dec 2008, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
> video buffers.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
Mauro, what about this patch? Is it correct? If so, it shall be applied I
presume, as in that case it is a bug-fix.
Thanks
Guennadi
> ---
>
> drivers/media/video/videobuf-dma-contig.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- 0001/drivers/media/video/videobuf-dma-contig.c
> +++ work/drivers/media/video/videobuf-dma-contig.c 2008-12-07 22:34:47.000000000 +0900
> @@ -400,7 +400,7 @@ void videobuf_dma_contig_free(struct vid
> So, it should free memory only if the memory were allocated for
> read() operation.
> */
> - if ((buf->memory != V4L2_MEMORY_USERPTR) || !buf->baddr)
> + if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
> return;
>
> if (!mem)
>
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] videobuf-dma-contig: fix USERPTR free handling
2009-01-11 18:26 ` Guennadi Liakhovetski
@ 2009-01-16 4:57 ` Magnus Damm
2009-01-24 0:54 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 4+ messages in thread
From: Magnus Damm @ 2009-01-16 4:57 UTC (permalink / raw)
To: Guennadi Liakhovetski; +Cc: video4linux-list, Mauro Carvalho Chehab
On Mon, Jan 12, 2009 at 3:26 AM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Wed, 10 Dec 2008, Magnus Damm wrote:
>
>> From: Magnus Damm <damm@igel.co.jp>
>>
>> This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
>> video buffers.
>>
>> Signed-off-by: Magnus Damm <damm@igel.co.jp>
>
> Mauro, what about this patch? Is it correct? If so, it shall be applied I
> presume, as in that case it is a bug-fix.
It's a bug fix and getting it included would be great!
Thank you.
/ magnus
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] videobuf-dma-contig: fix USERPTR free handling
2009-01-16 4:57 ` Magnus Damm
@ 2009-01-24 0:54 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2009-01-24 0:54 UTC (permalink / raw)
To: Magnus Damm; +Cc: video4linux-list, Guennadi Liakhovetski
On Fri, 16 Jan 2009 13:57:27 +0900
"Magnus Damm" <magnus.damm@gmail.com> wrote:
> On Mon, Jan 12, 2009 at 3:26 AM, Guennadi Liakhovetski
> <g.liakhovetski@gmx.de> wrote:
> > On Wed, 10 Dec 2008, Magnus Damm wrote:
> >
> >> From: Magnus Damm <damm@igel.co.jp>
> >>
> >> This patch fixes a free-without-alloc bug for V4L2_MEMORY_USERPTR
> >> video buffers.
> >>
> >> Signed-off-by: Magnus Damm <damm@igel.co.jp>
> >
> > Mauro, what about this patch? Is it correct? If so, it shall be applied I
> > presume, as in that case it is a bug-fix.
>
> It's a bug fix and getting it included would be great!
The patch is ok. I've just committed it. I should be adding on my next upstream pull request.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-24 0:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 4:54 [PATCH] videobuf-dma-contig: fix USERPTR free handling Magnus Damm
2009-01-11 18:26 ` Guennadi Liakhovetski
2009-01-16 4:57 ` Magnus Damm
2009-01-24 0:54 ` 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