From: "John W. Linville" <linville@tuxdriver.com>
To: Greg KH <greg@kroah.com>
Cc: Eric Valette <eric.valette@free.fr>,
Larry Finger <Larry.Finger@lwfinger.net>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: DMA debug trace pointing to rtl8187
Date: Wed, 6 May 2009 14:03:53 -0400 [thread overview]
Message-ID: <20090506180353.GD30070@tuxdriver.com> (raw)
In-Reply-To: <20090506064513.GA7460@kroah.com>
On Tue, May 05, 2009 at 11:45:13PM -0700, Greg KH wrote:
> On Wed, May 06, 2009 at 08:35:52AM +0200, Eric Valette wrote:
> > FUJITA Tomonori wrote:
> > > CC'ed linux-usb,
> > >
> > > The ehci_hcd driver uses buffers on the stack for DMA?
> > >
> > > On Sun, 03 May 2009 17:36:24 +0200
> > > Eric Valette <eric.valette@free.fr> wrote:
> > >
> > >> ------------[ cut here ]------------
> > >>
> > >> WARNING: at /usr/src/linux-2.6.22.9/lib/dma-debug.c:609
> > >
> > > Hmm, the kernel version is wired. lib/dma-debug.c was added in
> > > 2.6.30-rc.
> >
> > No that's the file path. I use ketchup to apply patches...
> >
> > >
> > >> check_for_stack+0x6b/0x8b()
> > >> Hardware name: P5W DH Deluxe
> > >>
> > >> ehci_hcd 0000:00:1d.7: DMA-API: device driver maps memory fromstack
> > >> [addr=ffff88007fa79968]
> > >> Modules linked in:
> > >>
> > >> Pid: 297, comm: khubd Not tainted 2.6.30-rc4-git1 #32
> >
> > Here is the real version.
>
> The problem is in the rtl8187 driver.
>
> They are calling usb_control_msg and passing a pointer to a buffer on
> the stack. See drivers/net/wireless/rtl818x/rtl8187.h for where the
> problem happens in numerous places.
>
> Also it looks like rtl8225_write_8051() is incorrect. You are passing a
> pointer to a variable that was passed as an argument. I don't know
> where that is supposed to be on, somewhere on the stack I guess.
>
> Larry, care to fix this up?
I just sent '[RFT] rtl8187: use DMA-aware buffers with usb_control_msg'
as a parallel reply to this message. It is pretty ugly w.r.t. kmalloc
failures, but it might be worth testing just to see if it helps the
problem at hand...?
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
next prev parent reply other threads:[~2009-05-06 18:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49FDB9F8.3080400@free.fr>
[not found] ` <20090506133131F.fujita.tomonori@lab.ntt.co.jp>
[not found] ` <4A012FC8.3020304@free.fr>
2009-05-06 6:45 ` DMA debug trace pointing to rtl8187 Greg KH
2009-05-06 18:02 ` [RFT] rtl8187: use DMA-aware buffers with usb_control_msg John W. Linville
2009-05-08 23:20 ` Hin-Tak Leung
2009-05-09 9:38 ` Eric Valette
2009-05-09 13:57 ` Greg KH
2009-05-09 15:50 ` John W. Linville
2009-05-09 16:35 ` Greg KH
2009-05-09 21:24 ` Larry Finger
2009-05-11 13:20 ` John W. Linville
2009-05-11 22:23 ` Hin-Tak Leung
2009-05-06 18:03 ` John W. Linville [this message]
2009-05-09 17:29 ` DMA debug trace pointing to rtl8187 Larry Finger
2009-05-09 17:46 ` Eric Valette
2009-05-09 19:22 ` Eric Valette
2009-05-09 19:29 ` Greg KH
2009-05-09 20:19 ` Michael Buesch
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=20090506180353.GD30070@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=Larry.Finger@lwfinger.net \
--cc=eric.valette@free.fr \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).