mm/slab: document kfree() as allowed for kmem_cache_alloc() objects
authorVlastimil Babka <vbabka@suse.cz>
Thu, 2 Mar 2023 15:01:00 +0000 (16:01 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Wed, 29 Mar 2023 08:35:41 +0000 (10:35 +0200)
commitae65a5211d90e54ae604012ce9cf234c48780929
tree426cc35415d01738cf68cbe05f2a587a7713859d
parent6630e950d532ffabce3a4bdbac7be844bad193fe
mm/slab: document kfree() as allowed for kmem_cache_alloc() objects

This will make it easier to free objects in situations when they can
come from either kmalloc() or kmem_cache_alloc(), and also allow
kfree_rcu() for freeing objects from kmem_cache_alloc().

For the SLAB and SLUB allocators this was always possible so with SLOB
gone, we can document it as supported.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Frederic Weisbecker <frederic@kernel.org>
Cc: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Documentation/core-api/memory-allocation.rst
include/linux/rcupdate.h
mm/slab_common.c