Re: Oops in a driver while using SLUB as a SLAB allocator

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Russell King
Date: Sunday, June 24, 2007 - 3:51 am

On Sun, Jun 24, 2007 at 11:24:16AM +0100, Hugh Dickins wrote:

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.

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.

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.

If we're after a simple fix for 2.6.22, the _easiest_ solution would be
to delete the entire arch_is_coherent() branches in arch/arm/mm/consistent.c;
that will result in a working solution for everyone, albiet at a slightly
lower performance for the DMA-coherent CPUs.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Oops in a driver while using SLUB as a SLAB allocator, Nicolas Ferre, (Thu Jun 21, 2:30 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Nicolas Ferre, (Thu Jun 21, 8:54 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 6:01 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 6:36 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 6:41 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 10:10 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 10:13 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Thu Jun 21, 10:31 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Thu Jun 21, 10:37 pm)
[PATCH] mmc-atmel : fix kunmap wrong usage, Marc Pignat, (Thu Jun 21, 11:28 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Russell King, (Fri Jun 22, 12:00 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Nicolas Ferre, (Fri Jun 22, 2:09 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Hugh Dickins, (Fri Jun 22, 5:00 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Nicolas Ferre, (Fri Jun 22, 6:34 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Hugh Dickins, (Fri Jun 22, 6:46 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Marc Pignat, (Fri Jun 22, 7:21 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Marc Pignat, (Fri Jun 22, 7:58 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Linus Torvalds, (Fri Jun 22, 9:40 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 10:26 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 10:41 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Fri Jun 22, 11:39 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 11:51 am)
Re: [PATCH] mmc-atmel : fix kunmap wrong usage, Jens Axboe, (Fri Jun 22, 12:00 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Fri Jun 22, 12:01 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 12:11 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 1:15 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Fri Jun 22, 3:54 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Russell King, (Sun Jun 24, 3:51 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Nicolas Ferre, (Mon Jun 25, 6:55 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Mon Jun 25, 7:07 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Mon Jun 25, 10:00 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Mon Jun 25, 10:23 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Mon Jun 25, 11:23 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Mon Jun 25, 11:43 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Mon Jun 25, 11:50 am)
Re: Oops in a driver while using SLUB as a SLAB allocator, Hugh Dickins, (Mon Jun 25, 12:04 pm)
Re: Oops in a driver while using SLUB as a SLAB allocator, Christoph Lameter, (Tue Jun 26, 11:09 am)