• Paul E. McKenney's avatar
    doc: SLAB_TYPESAFE_BY_RCU uses cannot rely on spinlocks · 99cf0920
    Paul E. McKenney authored
    
    
    Because the SLAB_TYPESAFE_BY_RCU code does not zero pages that are
    to be broken up into slabs, the memory returned by kmem_cache_alloc()
    must be fully initialized, including any spinlocks included in the newly
    allocated structure.  This means that readers attempting to look up an
    SLAB_TYPESAFE_BY_RCU object must use a reference-counting approach.
    A spinlock may be acquired only after a reference is obtained, which
    prevents that object from being passed to kmem_struct_free(), but only
    while that reference continues to be held.
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    99cf0920
whatisRCU.rst 46 KB