Re: [2.6.31-rc4] ftdi_usb maps memory from stack...
Robert Hancock <[email protected]> Tue, 28 Jul 2009 13:31:23 -0600
| Newsgroups | gmane.linux.kernel,gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07/27/2009 04:17 PM, Daniel J Blueman wrote: > With DMA debugging enabled, I see a warning when the FTDI USB-serial > driver loads [1] using a non-DMAable address. > > I can get a disassembly of some of the stack frames to identify the > exact call-sites etc, if that helps anyone? > > Thanks, > Daniel > > --- [1] > > usbcore: registered new interface driver usbserial_generic > > usbserial: USB Serial Driver core > > USB Serial support registered for FTDI USB Serial Device > > ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected > > usb 5-1: Detected FT8U232AM > > usb 5-1: Number of endpoints 2 > > usb 5-1: Endpoint 1 MaxPacketSize 64 > > usb 5-1: Endpoint 2 MaxPacketSize 64 > > usb 5-1: Setting MaxPacketSize 64 > > ------------[ cut here ]------------ > > WARNING: at lib/dma-debug.c:856 check_for_stack+0x9a/0xc0() > > Hardware name: OEM > > uhci_hcd 0000:00:1d.0: DMA-API: device driver maps memory from stack > [addr=ffff88007f89b946] Looks like some of the functions in ftdi_sio.c call usb_control_msg with a stack buffer and some use a kmalloc buffer. They should likely all be using a kmalloc buffer.