We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a442673 commit 32fad12Copy full SHA for 32fad12
include/linux/slab.h
@@ -74,6 +74,12 @@
74
* rcu_read_lock before reading the address, then rcu_read_unlock after
75
* taking the spinlock within the structure expected at that address.
76
*
77
+ * Note that it is not possible to acquire a lock within a structure
78
+ * allocated with SLAB_DESTROY_BY_RCU without first acquiring a reference
79
+ * as described above. The reason is that SLAB_DESTROY_BY_RCU pages are
80
+ * not zeroed before being given to the slab, which means that any locks
81
+ * must be initialized after each and every kmem_struct_alloc().
82
+ *
83
* Note that SLAB_TYPESAFE_BY_RCU was originally named SLAB_DESTROY_BY_RCU.
84
*/
85
/* Defer freeing slabs to RCU */
0 commit comments