Skip to content

Commit

Permalink
slab: Update the kmem_cache_create documentation regarding the name p…
Browse files Browse the repository at this point in the history
…arameter

kmem_cache implementations like slub are allowed to merge multiple
caches but only the initial name is preserved. Therefore,
kmem_cache_name() is not guaranteed to return the same pointer passed to
the former function. This patch updates the documentation to make this
clearer.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
  • Loading branch information
Catalin Marinas authored and Pekka Enberg committed Nov 26, 2008
1 parent ed31348 commit 249da16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -2123,6 +2123,8 @@ static int __init_refok setup_cpu_cache(struct kmem_cache *cachep)
*
* @name must be valid until the cache is destroyed. This implies that
* the module calling this has to destroy the cache before getting unloaded.
* Note that kmem_cache_name() is not guaranteed to return the same pointer,
* therefore applications must manage it themselves.
*
* The flags are
*
Expand Down

0 comments on commit 249da16

Please sign in to comment.