linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
	Christian Casteyde <casteyde.christian@free.fr>,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: 2.6.32-rc5-git3: Reported regressions from 2.6.31
Date: Mon, 26 Oct 2009 20:37:33 +0100	[thread overview]
Message-ID: <200910262037.35469.mb@bu3sch.de> (raw)
In-Reply-To: <200910262011.22950.mb@bu3sch.de>

On Monday 26 October 2009 20:11:20 Michael Buesch wrote:
> On Monday 26 October 2009 19:59:02 John W. Linville wrote:
> > > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=14277
> > > Subject		: Caught 8-bit read from freed memory in b43 driver at association
> > > Submitter	: Christian Casteyde <casteyde.christian@free.fr>
> > > Date		: 2009-09-30 18:06 (27 days old)
> 
> Does this still trigger with a recent kernel (and thus recent memory debugging).
> I'm still not convinced that this is a wireless bug.
> 

Ok, it just turns out this actually is a driver bug.
Thanks to Johannes Berg for tracking it down.

I think it's caused by the DMA bouncebuffer stuff that does not copy the skb->cb
and does not adjust the "tx-info" pointer.
I wonder why this didn't blow up easlier, because this bug is there since mac80211
switched to using the CB.

Here's a completely untested patch.

---
 drivers/net/wireless/b43/dma.c |    2 ++
 1 file changed, 2 insertions(+)

--- wireless-testing.orig/drivers/net/wireless/b43/dma.c
+++ wireless-testing/drivers/net/wireless/b43/dma.c
@@ -1224,6 +1224,8 @@ static int dma_tx_fragment(struct b43_dm
 		}
 
 		memcpy(skb_put(bounce_skb, skb->len), skb->data, skb->len);
+		memcpy(bounce_skb->cb, skb->cb, sizeof(skb->cb));
+		info = IEEE80211_SKB_CB(bounce_skb);
 		dev_kfree_skb_any(skb);
 		skb = bounce_skb;
 		meta->skb = skb;


-- 
Greetings, Michael.

  reply	other threads:[~2009-10-26 19:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-26 18:45 2.6.32-rc5-git3: Reported regressions from 2.6.31 Rafael J. Wysocki
2009-10-26 18:59 ` John W. Linville
2009-10-26 19:11   ` Michael Buesch
2009-10-26 19:37     ` Michael Buesch [this message]
2009-10-26 20:38       ` Michael Buesch
2009-10-28 19:05         ` John W. Linville
2009-10-28 20:38           ` Christian Casteyde
2009-10-28 20:57             ` Michael Buesch
2009-11-01 15:28             ` Michael Buesch
2009-11-02 23:43               ` Christian Casteyde
2009-11-03 14:10                 ` 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=200910262037.35469.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=casteyde.christian@free.fr \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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).