[lkml]   [2011]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 0/6] get rid of on-stack dma buffers
    Am Dienstag, 22. März 2011, 14:08:17 schrieb Florian Mickler:
    > Am 22.03.2011 12:10 schrieb "Roedel, Joerg" <>:
    > >
    > > On Mon, Mar 21, 2011 at 05:03:15PM -0400, Florian Mickler wrote:
    > > > I guess (not verified), that the dma api takes sufficient precautions
    > > > to abort the dma transfer if a timeout happens. So freeing _should_
    > > > not be an issue. (At least, I would expect big fat warnings everywhere
    > > > if that were the case)
    > >
    > > Freeing is very well an issue. All you can expect from the DMA-API is to
    > > give you a valid DMA handle for your device. But it can not prevent that
    > > a device uses this handle after you returned it. You need to make sure
    > > yourself that any pending DMA is canceled before calling kfree().
    > Does usb_control_msg do this? It waits for completion but takes also a
    > timeout parameter. I will recheck this once I'm home.

    It uses usb_start_wait_urb() which upon a timeout kills the URB. The
    buffer is unused after usb_control_msg() returns.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2011-03-22 14:15    [W:0.021 / U:5.724 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site