mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* cdc_ncm uses stack memory for DMA
@ 2011-08-01 19:59 Josh Boyer
  2011-08-01 20:26 ` Oliver Neukum
  0 siblings, 1 reply; 5+ messages in thread
From: Josh Boyer @ 2011-08-01 19:59 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

Hi,

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:

https://bugzilla.redhat.com/show_bug.cgi?id=720128

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.

josh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-02 12:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 19:59 cdc_ncm uses stack memory for DMA Josh Boyer
2011-08-01 20:26 ` Oliver Neukum
2011-08-02 11:01   ` Josh Boyer
2011-08-02 12:00     ` Alexey ORISHKO
2011-08-02 12:08       ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®