From: Nicolas Ferre <nicolas.ferre@rfo.atmel.com>
To: Russell King <rmk+lkml@arm.linux.org.uk>,
Hugh Dickins <hugh@veritas.com>,
Andrew Victor <andrew@sanpeople.com>
Cc: Christoph Lameter <clameter@sgi.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
ARM Linux Mailing List <linux-arm-kernel@lists.arm.linux.org.uk>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Marc Pignat <marc.pignat@hevs.ch>,
Andrew Victor <andrew@sanpeople.com>,
Pierre Ossman <drzeus@drzeus.cx>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Oops in a driver while using SLUB as a SLAB allocator
Date: Mon, 25 Jun 2007 15:55:05 +0200 [thread overview]
Message-ID: <467FC939.3080603@rfo.atmel.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706250120560.28286@blonde.wat.veritas.com>
Hugh Dickins :
> On Sun, 24 Jun 2007, Russell King wrote:
>> On Sun, Jun 24, 2007 at 11:24:16AM +0100, Hugh Dickins wrote:
>>> On Sun, 24 Jun 2007, Russell King wrote:
>>>> On Fri, Jun 22, 2007 at 07:39:33PM +0100, Hugh Dickins wrote:
>>>>
>>>> Please forward the original problem report.
>>> Done.
>> Okay, that seems to back up my suspicions - it's definitely AT91-based.
>> Since AT91-based machines do not have a DMA coherent cache,
>> arch_is_coherent() must be defined to '0'. The only way that kmalloc
>> could be reached is if that were defined to something other than '0',
>> and if that's done on a machine with DMA incoherent caches, that will
>> lead to data corruption.
>
> Yes, having looked through that now, I agree with you 100%.
AT91 _is_ defined with the arch_is_coherent() switch set to 0 (in
include/asm-arm/memory.h and not overloaded).
>> I think we need to wait for Nicolas to respond on this issue before
>> running headlong into applying a sticky plaster for something which is
>> actually a deeper issue.
>
> No need for Nicolas to respond, I think I've found what's "wrong":
> see below.
>
>> However, the arch_is_coherent() path _is_ buggy as it stands, but in
>> more than the way identified thus far. Eg, it doesn't set __GFP_DMA
>> appropriately for various DMA masks, so it might return DMA inaccessible
>> memory.
Ok it is bad but, in AT91, all memory is accessible with DMA.
[..]
> The slub allocation which gives rise to Nicolas' oops in not in
> ARM, but (I'm guessing) in drivers/mmc/core/sd.c: one of those
> status = kmalloc(64, GFP_KERNEL);
> where status is passed down for the response from mmc_sd_switch.
True, the oops appears after a mmc switch command (#6 command).
[..]
Not sure I can add much to what Hugh has said. If you need some more
precision anyway, I will try to answer.
Regards,
--
Nicolas Ferre
next prev parent reply other threads:[~2007-06-25 13:56 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 9:30 Oops in a driver while using SLUB as a SLAB allocator Nicolas Ferre
2007-06-21 14:54 ` Marc Pignat
2007-06-21 14:57 ` Marc Pignat
2007-06-21 15:54 ` Nicolas Ferre
2007-06-22 6:28 ` [PATCH] mmc-atmel : fix kunmap wrong usage Marc Pignat
2007-06-22 12:00 ` Hugh Dickins
2007-06-22 13:34 ` Nicolas Ferre
2007-06-22 13:46 ` Hugh Dickins
2007-06-22 14:21 ` Marc Pignat
2007-06-22 14:58 ` Marc Pignat
2007-06-22 19:00 ` Jens Axboe
2007-06-22 9:09 ` Oops in a driver while using SLUB as a SLAB allocator Nicolas Ferre
2007-06-21 22:27 ` Hugh Dickins
2007-06-22 1:01 ` Christoph Lameter
2007-06-22 4:26 ` Hugh Dickins
2007-06-22 5:13 ` Christoph Lameter
2007-06-22 7:00 ` Russell King
2007-06-22 1:36 ` Christoph Lameter
2007-06-22 4:40 ` Hugh Dickins
2007-06-22 5:10 ` Christoph Lameter
2007-06-22 5:37 ` Hugh Dickins
2007-06-22 16:40 ` Linus Torvalds
2007-06-22 17:26 ` Christoph Lameter
2007-06-22 17:41 ` Christoph Lameter
2007-06-22 18:39 ` Hugh Dickins
2007-06-22 18:51 ` Christoph Lameter
2007-06-22 19:01 ` Hugh Dickins
2007-06-22 19:11 ` Christoph Lameter
2007-06-22 20:21 ` Hugh Dickins
2007-06-22 22:54 ` Christoph Lameter
2007-06-22 20:15 ` Christoph Lameter
2007-06-23 10:40 ` Oleg Verych
2007-06-24 8:38 ` Russell King
2007-06-24 10:24 ` Hugh Dickins
2007-06-24 10:51 ` Russell King
2007-06-25 0:25 ` Hugh Dickins
2007-06-25 13:55 ` Nicolas Ferre [this message]
2007-06-25 14:07 ` Christoph Lameter
2007-06-25 16:42 ` Hugh Dickins
2007-06-25 17:00 ` Christoph Lameter
2007-06-25 17:23 ` Hugh Dickins
2007-06-25 18:23 ` Christoph Lameter
2007-06-25 18:43 ` Hugh Dickins
2007-06-25 18:50 ` Christoph Lameter
2007-06-25 19:04 ` Hugh Dickins
2007-06-26 18:09 ` Christoph Lameter
2007-06-22 20:18 ` Russell King
2007-06-22 1:41 ` Christoph Lameter
2007-06-22 4:46 ` Hugh Dickins
2007-06-22 5:31 ` Christoph Lameter
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=467FC939.3080603@rfo.atmel.com \
--to=nicolas.ferre@rfo.atmel.com \
--cc=akpm@linux-foundation.org \
--cc=andrew@sanpeople.com \
--cc=clameter@sgi.com \
--cc=drzeus@drzeus.cx \
--cc=hugh@veritas.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.pignat@hevs.ch \
--cc=rmk+lkml@arm.linux.org.uk \
--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).