Re: [Bugme-new] [Bug 33502] New: Caught 64-bit read from uninitialized memory in __alloc_skb

Christoph Lameter
2011-05-09T20:04:12Z

On Mon, 9 May 2011, Pekka Enberg wrote:

> On Wed, 20 Apr 2011, Eric Dumazet wrote:
> > [PATCH v4] slub: dont use cmpxchg_double if KMEMCHECK or DEBUG_PAGEALLOC
> >
> > Christian Casteyde reported a KMEMCHECK splat in slub code.
> >
> > Problem is now we are lockless and allow IRQ in slab_alloc(), the object
> > we manipulate from freelist can be allocated and freed right before we
> > try to read object->next.
> >
> > Same problem can happen with DEBUG_PAGEALLOC
> >
> > Just dont use cmpxchg_double() if either CONFIG_KMEMCHECK or
> > CONFIG_DEBUG_PAGEALLOC is defined.
>
> Christoph, Eric, is this still relevant after commit 1759415 ("slub: Remove
> CONFIG_CMPXCHG_LOCAL ifdeffery") in slab/next of slab.git?

There is still an issue and now you can no longer fix the thing through
CONFIG_CMPXCHG_LOCAL.

It needs to be legal for slub to deref the counter even if the object has
been freed.