Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexey Zaytsev <alexey.zaytsev@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	netdev@vger.kernel.org, Gary Zambrano <zambrano@broadcom.com>,
	bugme-daemon@bugzilla.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Pekka Pietikainen <pp@ee.oulu.fi>,
	Florian Schirmer <jolt@tuxbox.org>,
	Felix Fietkau <nbd@openwrt.org>, Michael Buesch <mb@bu3sch.de>
Subject: Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
Date: Sun, 03 Jul 2011 17:46:11 +0200	[thread overview]
Message-ID: <1309707971.2523.20.camel@edumazet-laptop> (raw)
In-Reply-To: <CAB9v_DHXB6n07sEY_=HZ8S4zMO01Vs8B78dGyEWrm-hyRP82XA@mail.gmail.com>

Le dimanche 03 juillet 2011 à 01:25 +0400, Alexey Zaytsev a écrit :
> On Fri, Jul 1, 2011 at 10:01, Alexey Zaytsev <alexey.zaytsev@gmail.com> wrote:
> > On Thu, Jun 30, 2011 at 01:51, Andrew Morton <akpm@linux-foundation.org> wrote:
> >>
> >> (switched to email.  Please respond via emailed reply-to-all, not via the
> >> bugzilla web interface).
> >>
> >> On Thu, 23 Jun 2011 17:33:54 GMT
> >> bugzilla-daemon@bugzilla.kernel.org wrote:
> >>
> >>> https://bugzilla.kernel.org/show_bug.cgi?id=38102
> >>>
> >>>            Summary: BUG kmalloc-2048: Poison overwritten
> >>>            Product: Drivers
> >>>            Version: 2.5
> >>>     Kernel Version: 3.0.0-rc4
> >>
> >> Looks like a 2.6.38->2.6.39 regression, perhaps a memory scribble in b44.
> >
> > Actually, not sure about the version. 39 was the first one I've been
> > using in the scenario. Checking older versions now.
> > And git-log does not show a lot of changes to the b44 driver, so it
> > might be something unrelated.
> >
> 
> I've checked back as far as 2.6.27, and the problem is still there.
> I've also looked through the allocation-related code, and it seemed
> sane. I'm not sure I understand the 1GB dma workaround, but this path
> is never hit in my case. So adding the driver authors to CC. This
> could be something different, but I've been unable to reproduce using
> an other machine with an rtl8139 nic.

Hmm, looking at b44 code, I believe there is a race there.

Could you try following patch ?

Thanks

diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index a69331e..80f2fdc 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -689,9 +689,9 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
 		ctrl |= DESC_CTRL_EOT;
 
 	dp = &bp->rx_ring[dest_idx];
-	dp->ctrl = cpu_to_le32(ctrl);
 	dp->addr = cpu_to_le32((u32) mapping + bp->dma_offset);
-
+	wmb();
+	dp->ctrl = cpu_to_le32(ctrl);
 	if (bp->flags & B44_FLAG_RX_RING_HACK)
 		b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
 			                    dest_idx * sizeof(*dp),



  reply	other threads:[~2011-07-03 15:46 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38102-10286@https.bugzilla.kernel.org/>
2011-06-29 21:51 ` [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten Andrew Morton
2011-07-01  6:01   ` Alexey Zaytsev
2011-07-02 21:25     ` Alexey Zaytsev
2011-07-03 15:46       ` Eric Dumazet [this message]
2011-07-04 11:48         ` Alexey Zaytsev
2011-07-04 13:05           ` Michael Büsch
2011-07-04 13:57             ` Eric Dumazet
2011-07-04 14:27               ` Michael Büsch
2011-07-04 14:43                 ` Michael Büsch
2011-07-04 14:53                   ` Eric Dumazet
2011-07-04 15:12                   ` Eric Dumazet
2011-07-04 20:25                     ` Alexey Zaytsev
2011-07-04 22:29                       ` Alexey Zaytsev
2011-07-05  3:44                         ` Eric Dumazet
2011-07-05  3:56                           ` Alexey Zaytsev
2011-07-05  4:11                             ` Eric Dumazet
2011-07-05  4:14                               ` Eric Dumazet
2011-07-05  4:17                                 ` Alexey Zaytsev
2011-07-05  4:18                                   ` Alexey Zaytsev
2011-07-05  4:25                                   ` Eric Dumazet
2011-07-05  4:29                                     ` Alexey Zaytsev
2011-07-05  4:38                                       ` Eric Dumazet
2011-07-05  4:57                                         ` Alexey Zaytsev
2011-07-05  5:10                                           ` Eric Dumazet
2011-07-05  5:18                                             ` Alexey Zaytsev
2011-07-05  5:33                                               ` Eric Dumazet
2011-07-05  5:59                                                 ` Eric Dumazet
2011-07-05 16:05                                                   ` Neil Horman
2011-07-05 16:12                                                     ` Eric Dumazet
2011-07-05 16:27                                                       ` Michael Büsch
2011-07-05 16:42                                                       ` Neil Horman
2011-07-05 16:47                                                         ` Eric Dumazet
2011-07-05 16:57                                                           ` Eric Dumazet
2011-07-05 17:01                                                             ` Joe Perches
2011-07-05 17:21                                                           ` Neil Horman
2011-07-05 18:06                                                           ` Neil Horman
2011-07-05 18:13                                                             ` Eric Dumazet
2011-07-05 18:32                                                               ` Eric Dumazet
2011-07-05 18:45                                                                 ` Eric Dumazet
2011-07-05 19:53                                                                   ` Neil Horman
2011-07-05 20:02                                                                     ` Eric Dumazet
2011-07-05 20:15                                                                       ` Eric Dumazet
2011-07-05 22:06                                                                         ` Neil Horman
2011-07-06 15:32                                                                           ` Michael Büsch
2011-07-06 16:00                                                                             ` Eric Dumazet
2011-07-06 16:12                                                                               ` Michael Büsch
2011-07-06 16:35                                                                                 ` Eric Dumazet
2011-07-06 16:56                                                                             ` Eric Dumazet
2011-07-07  6:32                                                                               ` Alexey Zaytsev
2011-07-07  6:48                                                                                 ` Eric Dumazet
2011-07-07  7:45                                                                                   ` Alexey Zaytsev
2011-07-07  9:20                                                                                     ` Eric Dumazet
2011-07-07  9:34                                                                                       ` Alexey Zaytsev
2011-07-07  9:37                                                                                         ` Alexey Zaytsev
2011-07-07  9:43                                                                                           ` Alexey Zaytsev
2011-07-07  9:52                                                                                             ` Eric Dumazet
2011-07-05  4:21                           ` Eric Dumazet
2011-07-04 14:00           ` Eric Dumazet
2011-07-04 14:31             ` Michael Büsch
2011-07-04 14:45               ` Eric Dumazet
2011-07-04 14:51                 ` Michael Büsch

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=1309707971.2523.20.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexey.zaytsev@gmail.com \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=davem@davemloft.net \
    --cc=jolt@tuxbox.org \
    --cc=mb@bu3sch.de \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=pp@ee.oulu.fi \
    --cc=zambrano@broadcom.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