Messages in this thread | | | From | Oliver Neukum <> | Subject | Re: [PATCH] usb/mcs7830: Don't use buffers from stack for USB transfers | Date | Tue, 20 Jan 2009 23:50:21 +0100 |
| |
Am Tuesday 20 January 2009 23:45:47 schrieb Arnd Bergmann: > Have you observed problems with this, or just suspected trouble? > > When I wrote this code, I looked at other code doing the same > and assumed it was ok, because usb_control_msg waits for the > DMA to complete before returning. > > Is the problem only on systems that have noncoherent DMA, or > something else?
That's not enough. Tasks can leave pointers to variables on the stack to other tasks. You must under no circumstances do DMA on the stack if the driver may run on system that have noncoherent DMA.
Regards Oliver
| |