[lkml]   [2011]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectcdc_ncm uses stack memory for DMA

    We've gotten a report that the cdc_ncm driver generates a stacktrace due
    to using stack variables that are passed to cdc_ncm_do_request. You can
    find the stack trace here:

    It's generated by lib/dma-debug.c and we have CONFIG_DMA_API_DEBUG set
    in our development kernels.

    Looking through the code, it seems that cdc_ncm_setup is still passing
    stack variables around lines 270, 276, 375, and 406. Which of those
    exactly is triggering the backtrace, I'm not sure but all of them seem
    incorrect from what I can tell.

    Do you have any thoughts on a solution for this? Off the top of my
    head, either the local variables being used could be added to the ctx
    structure or the variables can be changed to pointers and then be
    allocated via kmalloc and torn down shortly after.


     \ /
      Last update: 2011-08-01 22:03    [W:0.020 / U:5.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site