[lkml]   [2011]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/6] get rid of on-stack dma buffers
Florian Mickler <> wrote:

>Hi all!
>These patches get rid of on-stack dma buffers for some of the dvb-usb
>I do not own the hardware, so these are only compile tested. I would
>appreciate testing and review.
>They were previously sent to the list, but some error on my side
>prevented (some of?) them from beeing delivered to all parties (the
>These changes are motivated by
> .
>The patches which got tested already were submitted to Mauro (and
>lkml/linux-media) yesterday seperately. Those fix this same issue for
>ce6230, au6610 and lmedm04.
>A fix for vp702x has been submitted seperately for review on the list.
>I have
>similiar fixes like the vp702x-fix for dib0700 (overlooked some
>buffers in there in my original submission as well) and gp8psk, but I
>holding them back 'till I got time to recheck those and getting some
>on vp702x.
>Please review and test.
>Florian Mickler (6):
> [media] a800: get rid of on-stack dma buffers
> [media v2] vp7045: get rid of on-stack dma buffers
> [media] friio: get rid of on-stack dma buffers
> [media] dw2102: get rid of on-stack dma buffer
> [media] m920x: get rid of on-stack dma buffers
> [media] opera1: get rid of on-stack dma buffer
> drivers/media/dvb/dvb-usb/a800.c | 17 ++++++++++---
> drivers/media/dvb/dvb-usb/dw2102.c | 10 ++++++-
> drivers/media/dvb/dvb-usb/friio.c | 23 ++++++++++++++---
> drivers/media/dvb/dvb-usb/m920x.c | 33 ++++++++++++++++--------
> drivers/media/dvb/dvb-usb/opera1.c | 31 +++++++++++++++--------
>drivers/media/dvb/dvb-usb/vp7045.c | 47
> 6 files changed, 116 insertions(+), 45 deletions(-)
>To unsubscribe from this list: send the line "unsubscribe linux-media"
>the body of a message to
>More majordomo info at


For all of these, what happens when the USB call times out and you kfree() the buffer? Can the USB DMA actually complete after this kfree(), possibly corrupting space that has been reallocated off the heap, since the kfree()?

This is the scenario for which I assume allocating off the stack is bad.

Do these changes simply make corruption less noticable since heap gets corrupted vs stack?


 \ /
  Last update: 2011-03-21 20:31    [W:0.120 / U:2.104 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site