• Andrew Morton's avatar
    [PATCH] slab: initialisation cleanup and oops fix · 862fb282
    Andrew Morton authored
    From: Manfred Spraul <manfred@colorfullife.com>
    
    attached is the promised cleanup/bugfix patch for the slab bootstrap:
    
    - kmem_cache_init & kmem_cache_sizes_init merged into one function,
      called after mem_init().  It's impossible to bring slab to an operational
      state without working gfp, thus the early partial initialization is not
      necessary.
    
    - g_cpucache_up set to FULL at the end of kmem_cache_init instead of the
      module init call.  This is a bugfix: slab was completely initialized,
      just the update of the state was missing.
    
    - some documentation for the bootstrap added.
    
    The minimal fix for the bug is a two-liner: move g_cpucache_up=FULL from
    cpucache_init to kmem_cache_sizes_init, but I want to get rid of
    kmem_cache_sizes_init, too.
    862fb282
slab.c 64.1 KB