public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Hancock <hancockrwd@gmail.com>
To: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Linux USB <linux-usb-devel@lists.sourceforge.net>
Subject: Re: [2.6.31-rc4] ftdi_usb maps memory from stack...
Date: Tue, 28 Jul 2009 13:31:23 -0600	[thread overview]
Message-ID: <4A6F520B.6090202@gmail.com> (raw)
In-Reply-To: <6278d2220907271517u46894cbu69ae52148664e04e@mail.gmail.com>

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.

      reply	other threads:[~2009-07-28 19:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 22:17 [2.6.31-rc4] ftdi_usb maps memory from stack Daniel J Blueman
2009-07-28 19:31 ` Robert Hancock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A6F520B.6090202@gmail.com \
    --to=hancockrwd@gmail.com \
    --cc=daniel.blueman@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox