From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux v2.6.21-rc3
Date: Thu, 08 Mar 2007 09:08:43 +0100 [thread overview]
Message-ID: <1173341323.8635.10.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0703070735240.5963@woody.linux-foundation.org>
On Wed, 2007-03-07 at 07:39 -0800, Linus Torvalds wrote:
>
> On Wed, 7 Mar 2007, Benjamin Herrenschmidt wrote:
> >
> > On Tue, 2007-03-06 at 20:59 -0800, Linus Torvalds wrote:
> >
> > > Linus Torvalds (2):
> > > Revert "[PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant"
> > > Linux 2.6.21-rc3
> >
> > Greg, I think we should revert that patch in 2.6.20.x stable serie too
> > as get_order is broken there as well, causing random kernel memory
> > corruption every now and then among others.
>
> Did you confirm that that was indeed the cause of the problem you saw?
Well, at least one of the problem I caught with my ppc32 implementation
of DEBUG_PAGEALLOC yes. PowerPC dma_alloc_coherent, on machines with
cache consistent PCI DMA, would use get_order to allocate pages and then
memset over the size passed in. The ide-pmac driver, among others, would
trigger that bug by asking for 0x1020 bytes while get_order only
returned 0. (I should look into making the ide-pmac driver allocate <=
4K but that's a different matter).
I think it fixed David Woodhouse random crashes too.
> As far as I can tell, the bug (because it tested the wrong #define) would
> only affect the constant-size case, and only for something larger than a
> single page, and only for a non-power-of-two size. So it looked fairly
> hard to trigger, if only because all the obvious constants I saw seemed
> to already be powers-of-two..
>
> So did you hunt it down to a particular cases where it triggers?
Yup, the above. Calls to dma_alloc_consistent with a constant size that
is not a multiple of the page size and larger than one page. (Our
dma_alloc_consistent implementation on 32 bits is inline).
Ben.
next prev parent reply other threads:[~2007-03-08 8:08 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 4:59 Linux v2.6.21-rc3 Linus Torvalds
2007-03-07 10:25 ` Benjamin Herrenschmidt
2007-03-07 13:26 ` Greg KH
2007-03-07 14:15 ` Mark Lord
2007-03-07 14:22 ` Greg KH
2007-03-07 15:39 ` Linus Torvalds
2007-03-07 20:52 ` Arnd Bergmann
2007-03-08 8:10 ` Benjamin Herrenschmidt
2007-03-08 8:08 ` Benjamin Herrenschmidt [this message]
2007-03-07 12:56 ` Michal Piotrowski
2007-03-07 16:34 ` Linus Torvalds
2007-03-07 17:12 ` [patch] CPU hotplug: call check_tsc_sync_source() with irqs off Ingo Molnar
2007-03-07 17:45 ` Michal Piotrowski
2007-03-07 19:12 ` Linux-2.6.21-rc3 : Dynticks and High resolution Timer hanging the system Stephane Casset
2007-03-07 19:52 ` Thomas Gleixner
2007-03-07 21:16 ` Stephane Casset
2007-03-07 22:09 ` Thomas Gleixner
2007-03-07 13:09 ` Linux v2.6.21-rc3 Michal Piotrowski
2007-03-07 16:25 ` Linus Torvalds
2007-03-07 17:14 ` [Linux-parport] " Stephen Mollett
2007-03-07 17:35 ` Russell King
2007-03-07 14:22 ` Thomas Gleixner
2007-03-07 17:14 ` Thomas Gleixner
2007-03-07 17:42 ` Soeren Sonnenburg
2007-03-08 17:28 ` Alistair John Strachan
2007-03-13 12:49 ` [1/6] 2.6.21-rc3: known regressions Adrian Bunk
2007-03-13 13:08 ` Pierre Ossman
2007-03-13 13:36 ` Oliver Neukum
2007-03-13 18:11 ` Pavel Machek
2007-03-13 19:07 ` Pierre Ossman
2007-03-13 19:12 ` Mws
2007-03-13 19:15 ` Adrian Bunk
2007-03-13 20:05 ` Pavel Machek
2007-03-13 20:31 ` Pierre Ossman
2007-03-13 13:40 ` Takashi Iwai
2007-03-13 12:50 ` [2/6] " Adrian Bunk
2007-03-13 13:30 ` Cornelia Huck
2007-03-13 13:35 ` Mark Lord
2007-03-13 18:13 ` Pavel Machek
2007-03-13 12:50 ` [3/6] " Adrian Bunk
2007-03-13 14:03 ` Alan Cox
2007-03-13 20:12 ` Fabio Comolli
2007-03-13 15:13 ` Andi Kleen
2007-03-13 12:50 ` [4/6] " Adrian Bunk
2007-03-13 12:50 ` [5/6] " Adrian Bunk
2007-03-13 13:29 ` Lukas Hejtmanek
2007-03-13 18:14 ` Pavel Machek
2007-03-13 21:46 ` Arkadiusz Miskiewicz
2007-03-13 12:50 ` [6/6] " Adrian Bunk
2007-03-13 20:05 ` Thomas Gleixner
2007-03-14 11:31 ` Adrian Bunk
2007-03-13 20:46 ` Thomas Gleixner
2007-03-14 11:44 ` Adrian Bunk
2007-03-14 12:16 ` Jiri Slaby
2007-03-14 17:31 ` Adrian Bunk
2007-03-14 18:02 ` Florian Lohoff
2007-03-14 18:28 ` Thomas Gleixner
2007-03-13 19:26 ` Linux v2.6.21-rc3 Eric W. Biederman
2007-03-13 19:40 ` Greg KH
2007-03-13 19:48 ` Linus Torvalds
2007-03-13 20:04 ` Eric W. Biederman
2007-03-14 18:11 ` 2.6.21-rc3: known regressions with patches Adrian Bunk
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=1173341323.8635.10.camel@localhost.localdomain \
--to=benh@kernel.crashing.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).